mschnitzer / ark-survival-ascended-linux-container-image

A docker/podman container that is able to run an ARK: Survival Ascended on a Linux host.
92 stars 17 forks source link

Container doesn't start: wine: RLIMIT_NICE is <= 20, unable to use setpriority safely #19

Closed duartejbrito closed 1 year ago

duartejbrito commented 1 year ago

I'm getting this error and container doesn't start:

...
Success! App '2430930' fully installed.
Starting the ARK: Survival Ascended dedicated server...
Start parameters: TheIsland_WP?listen?Port=7777?RCONPort=27015?RCONEnabled=True -WinLiveMaxPlayers=10 
esync: up and running.
Failed to read /etc/machine-id, error Invalid argument.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

I'm using exactly your docker-compose example. I just changed the RCONPort on start parameters and on exposed ports.

Do you have any idea?

mschnitzer commented 1 year ago
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

is always shown, but it seems to be more a warning, than an error.

Could you please tell me whether the container exited with exit code 3?

docker inspect asa-server-1 | grep Exit

Also do you use any form of virtualization? e.g. Proxmox?

DarkVentHead commented 1 year ago
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

is always shown, but it seems to be more a warning, than an error.

Could you please tell me whether the container exited with exit code 3?

docker inspect asa-server-1 | grep Exit

Also do you use any form of virtualization? e.g. Proxmox?

I'll add to this.

IF VIRTUALIZED - Please make sure to push HOST cpu's through and NOT virtualized cpu's through as they do not have the required instruction set to launch the server. Verify you have at least 13GB of ram available to the server as i've (personally) found anything less to be slightly unstable.

duartejbrito commented 1 year ago

So I'm using a small VPS with 6 cores | 16 GB and Ubuntu 20.04 (64 Bit) and portainer to manage dockers. Result of the execution of docker inspect asa-server-1 | grep Exit was:

"ExitCode": 0
DarkVentHead commented 1 year ago

What is the output of docker inspect asa-server-1 | grep Status

ExitCode: 0 is essentially the the container is STILL running.

Run docker ps as well. Does it show the container as running?

duartejbrito commented 1 year ago

For docker inspect asa-server-1 | grep Status I get: "Status": "exited" And the container is not running.

DarkVentHead commented 1 year ago

can you post your docker-compose.yml? Please block all passwords.

Basically - Exitecode: 0 means that all code has been ran successfully. So if it is crashing. Maybe something isn't correct in your yaml file.

duartejbrito commented 1 year ago
version: "3.3"
services:
  asa-server-1:
    container_name: asa-server-1
    hostname: asa-server-1
    entrypoint: "/usr/bin/start_server"
    user: gameserver
    image: "mschnitzer/asa-linux-server:latest"
    environment:
      - ASA_START_PARAMS=TheIsland_WP?listen?Port=7777?RCONPort=27015?RCONEnabled=True -WinLiveMaxPlayers=10
      - ENABLE_DEBUG=0
    ports:
      # Game port for player connections through the server browser
      - 0.0.0.0:7777:7777/udp
      # RCON port for remote server administration
      - 0.0.0.0:27015:27015/tcp
    depends_on:
      - set-permissions-1
    volumes:
      - steam-1:/home/gameserver/Steam:rw
      - steamcmd-1:/home/gameserver/steamcmd:rw
      - server-files-1:/home/gameserver/server-files:rw
    networks:
      asa-network:
  set-permissions-1:
    entrypoint: "/bin/bash -c 'chown -R 25000:25000 /steam ; chown -R 25000:25000 /steamcmd ; chown -R 25000:25000 /server-files'"
    user: root
    image: "opensuse/leap"
    volumes:
      - steam-1:/steam:rw
      - steamcmd-1:/steamcmd:rw
      - server-files-1:/server-files:rw
#  asa-server-2:
#    container_name: asa-server-2
#    hostname: asa-server-2
#    entrypoint: "/usr/bin/start_server"
#    user: gameserver
#    image: "mschnitzer/asa-linux-server:latest"
#    environment:
#      - ASA_START_PARAMS=TheIsland_WP?listen?Port=7778?RCONPort=27021?RCONEnabled=True -WinLiveMaxPlayers=50
#    ports:
#      # Game port for player connections through the server browser
#      - 0.0.0.0:7778:7778/udp
#      # RCON port for remote server administration
#      - 0.0.0.0:27021:27021/tcp
#    depends_on:
#      - set-permissions-2
#    volumes:
#      - steam-2:/home/gameserver/Steam:rw
#      - steamcmd-2:/home/gameserver/steamcmd:rw
#      - server-files-2:/home/gameserver/server-files:rw
#    networks:
#      asa-network:
#  set-permissions-2:
#    entrypoint: "/bin/bash -c 'chown -R 25000:25000 /steam ; chown -R 25000:25000 /steamcmd ; chown -R 25000:25000 /server-files'"
#    user: root
#    image: "opensuse/leap"
#    volumes:
#      - steam-2:/steam:rw
#      - steamcmd-2:/steamcmd:rw
#      - server-files-2:/server-files:rw
volumes:
  steam-1:
  steamcmd-1:
  server-files-1:
#  steam-2:
#  steamcmd-2:
#  server-files-2:
networks:
  asa-network:
    attachable: true
    driver: bridge
    driver_opts:
      com.docker.network.bridge.name: 'asanet'

I just changed RCON port... exactly your example

DarkVentHead commented 1 year ago

Under image please add tty: true and stdin_open: true

Example:

version: "3.3"
services:
  asa-server-1:
    container_name: asa-server-1
    hostname: asa-server-1
    entrypoint: "/usr/bin/start_server"
    user: gameserver
    image: "mschnitzer/asa-linux-server:latest"
    tty: true
    stdin_open: true

run docker-compose down run docker-compose up -d

duartejbrito commented 1 year ago

Same thing

DarkVentHead commented 1 year ago

Interesting. I will have to leave it to the owner to help further. Seems very strange to get an exitcode: 0 (all code completed successfully) and still have the server instance crash. I was guessing tty: true should have kept that interactive session open allowing the server to continue to persist after the code completed.

DarkVentHead commented 1 year ago

I didn't notice this at first. Steam uses port 27015. Please pick a port =>27020

27015 is steams in server browser port, i believe. Not sure if this will solve your problem but in general, it's a port that should be avoided.

duartejbrito commented 1 year ago

I try it right now, and same thing. On my local I used that port with no issues, that's why I picked that one.

mschnitzer commented 1 year ago

I didn't notice this at first. Steam uses port 27015. Please pick a port =>27020

27015 is steams in server browser port, i believe. Not sure if this will solve your problem but in general, it's a port that should be avoided.

There's no steam serverlist support for ASA servers at the moment. There's just 7777 as the default game port for player connections and 27020 for RCON connections.

@duartejbrito please make sure that the latest image is installed: docker pull mschnitzer/asa-linux-server and then set the environment variable ENABLE_DEBUG to 1 in the docker-compose.yml file. Once done, start the container by running docker-compose up -d and then connect to the container using:

docker exec -ti asa-server-1 bash

Then run the start command manually by using start_server as a command. Then let it run and wait until it exits. Please post the whole output of the console.

duartejbrito commented 1 year ago

I assumed I have to change the ENABLE_DEBUG to 0 again before running start_server. Here the result:

root@vmi493060:~# docker exec -ti asa-server-1 bash
gameserver@asa-server-1:~> export ENABLE_DEBUG=0
gameserver@asa-server-1:~> start_server
Redirecting stderr to '/home/gameserver/Steam/logs/stderr.txt'
Logging directory: '/home/gameserver/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1698778122
-- type 'quit' to exit --
Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
OK

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
 Update state (0x5) verifying install, progress: 0.00 (0 / 9528123379)
 Update state (0x5) verifying install, progress: 3.03 (288892928 / 9528123379)
 Update state (0x5) verifying install, progress: 6.13 (583983104 / 9528123379)
 Update state (0x5) verifying install, progress: 9.04 (861812736 / 9528123379)
 Update state (0x5) verifying install, progress: 11.69 (1113485312 / 9528123379)
 Update state (0x5) verifying install, progress: 14.90 (1419372560 / 9528123379)
 Update state (0x5) verifying install, progress: 18.05 (1719437328 / 9528123379)
 Update state (0x5) verifying install, progress: 20.84 (1985419845 / 9528123379)
 Update state (0x5) verifying install, progress: 23.44 (2233527599 / 9528123379)
 Update state (0x5) verifying install, progress: 25.73 (2451476471 / 9528123379)
 Update state (0x5) verifying install, progress: 28.02 (2669580279 / 9528123379)
 Update state (0x5) verifying install, progress: 30.70 (2925432823 / 9528123379)
 Update state (0x5) verifying install, progress: 33.66 (3207499767 / 9528123379)
 Update state (0x5) verifying install, progress: 37.08 (3532558327 / 9528123379)
 Update state (0x5) verifying install, progress: 40.33 (3842936823 / 9528123379)
 Update state (0x5) verifying install, progress: 43.04 (4100886519 / 9528123379)
 Update state (0x5) verifying install, progress: 44.79 (4267600295 / 9528123379)
 Update state (0x5) verifying install, progress: 47.03 (4481269579 / 9528123379)
 Update state (0x5) verifying install, progress: 50.27 (4789457635 / 9528123379)
 Update state (0x5) verifying install, progress: 53.45 (5092560343 / 9528123379)
 Update state (0x5) verifying install, progress: 56.51 (5384125423 / 9528123379)
 Update state (0x5) verifying install, progress: 59.13 (5633686511 / 9528123379)
 Update state (0x5) verifying install, progress: 61.48 (5858328639 / 9528123379)
 Update state (0x5) verifying install, progress: 63.69 (6068043839 / 9528123379)
 Update state (0x5) verifying install, progress: 66.91 (6375276607 / 9528123379)
 Update state (0x5) verifying install, progress: 70.17 (6685655103 / 9528123379)
 Update state (0x5) verifying install, progress: 73.62 (7014907967 / 9528123379)
 Update state (0x5) verifying install, progress: 75.99 (7240364374 / 9528123379)
 Update state (0x5) verifying install, progress: 78.32 (7462662486 / 9528123379)
 Update state (0x5) verifying install, progress: 81.10 (7726903638 / 9528123379)
 Update state (0x5) verifying install, progress: 84.44 (8045999594 / 9528123379)
 Update state (0x5) verifying install, progress: 87.93 (8378398186 / 9528123379)
 Update state (0x5) verifying install, progress: 91.33 (8702408170 / 9528123379)
 Update state (0x5) verifying install, progress: 94.49 (9003349482 / 9528123379)
 Update state (0x5) verifying install, progress: 97.69 (9308485098 / 9528123379)
Success! App '2430930' fully installed.
Starting the ARK: Survival Ascended dedicated server...
Start parameters: TheIsland_WP?listen?Port=7777?RCONPort=27020?RCONEnabled=True -WinLiveMaxPlayers=10
esync: up and running.
Failed to read /etc/machine-id, error Invalid argument.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

After that, it took same time, and execution stopped. The container still running.

mschnitzer commented 1 year ago

I assumed I have to change the ENABLE_DEBUG to 0 again before running start_server.

Yes, that's right, forgot to say that.

After that, it took same time, and execution stopped.

Could you please run "echo $?" right after the execution stopped (before you type any other command - very important)

And could you please do a cat on the ShooterGameLog.log file of your server? Can be located somewhere in the server files - I believe the path was ShooterGame/Saved/Logs/ShooterGameLog.log - unable to look this up right now. But please do so after you ran "echo $?".

SirGallahad commented 1 year ago

Hi. I'm running in the same problem.

Host on W11. ASA work fine without docker.

`version: '3.3'

services:
asa-server-1: container_name: asa-server-1 hostname: asa-server-1 entrypoint: "/usr/bin/start_server" user: gameserver image: "mschnitzer/asa-linux-server:latest" tty: true stdin_open: true environment:

Result : 2023-11-13 11:31:04 Update state (0x5) verifying install, progress: 99.58 (9487896519 / 9528123379) 2023-11-13 11:31:04 Success! App '2430930' fully installed. 2023-11-13 11:31:06 Starting the ARK: Survival Ascended dedicated server... 2023-11-13 11:31:06 Start parameters: TheIsland_WP?listen?Port=7777?RCONPort=27020?RCONEnabled=True -WinLiveMaxPlayers=50 2023-11-13 11:31:23 esync: up and running. 2023-11-13 11:31:23 Failed to read /etc/machine-id, error Invalid argument. 2023-11-13 11:31:23 wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

I don't have any .log in saved. I have found this : [CrashReportClient] bHideLogFilesOption=false bIsAllowedToCloseWithoutSending=true CrashConfigPurgeDays=2

Do you need anything else ?

mschnitzer commented 1 year ago

Is my understanding right, that you are using this image on a Windows 11 host? I'm not too familiar with such setup and I cannot debug this on Windows myself. You adjusted a lot of settings, thus this makes it hard for me to say what the acutal problem is, especially because it's on Windows.

Why did you add the labels section with lines indicating that you plan to use letsencrypt ?

I'd suggest sticking with the native Windows binaries of the ASA server and start the server without the container or run it natively on a Linux host with any distribution that I tested this image with (see README).

SirGallahad commented 1 year ago

yes, you see it right. My host is on W11. It should not be of much importance but sometimes : / I havent done big modification (to my knowledge) just the adress of the directory.

Labels where added to use traefik and listening/redirecting everything to the container..

Ok, i'll keep using standard way for now. I'm still curious of @duartejbrito issue.

mschnitzer commented 1 year ago

Is your host running in a VM?

duartejbrito commented 1 year ago

Mine no... But I didn't have time yet to test what you asked last time. Sorry I'll try this evening

duartejbrito commented 1 year ago

So here the result:

root@vmi493060:~# docker exec -ti asa-server-1 bash
gameserver@asa-server-1:~> export ENABLE_DEBUG=0
gameserver@asa-server-1:~> start_server
Redirecting stderr to '/home/gameserver/Steam/logs/stderr.txt'
Logging directory: '/home/gameserver/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1698778122
-- type 'quit' to exit --
Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
OK

Connecting anonymously to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x5) verifying install, progress: 2.70 (257206272 / 9528123379)
 Update state (0x5) verifying install, progress: 6.06 (577703936 / 9528123379)
 Update state (0x5) verifying install, progress: 9.25 (881735680 / 9528123379)
 Update state (0x5) verifying install, progress: 12.62 (1202282512 / 9528123379)
 Update state (0x5) verifying install, progress: 15.75 (1500375056 / 9528123379)
 Update state (0x5) verifying install, progress: 19.09 (1818816512 / 9528123379)
 Update state (0x5) verifying install, progress: 21.76 (2073325735 / 9528123379)
 Update state (0x5) verifying install, progress: 24.80 (2362780159 / 9528123379)
 Update state (0x5) verifying install, progress: 28.05 (2672726007 / 9528123379)
 Update state (0x5) verifying install, progress: 31.31 (2983104503 / 9528123379)
 Update state (0x5) verifying install, progress: 34.68 (3303968759 / 9528123379)
 Update state (0x5) verifying install, progress: 38.00 (3620638711 / 9528123379)
 Update state (0x5) verifying install, progress: 41.31 (3936260087 / 9528123379)
 Update state (0x5) verifying install, progress: 44.31 (4221508599 / 9528123379)
 Update state (0x5) verifying install, progress: 47.33 (4509581131 / 9528123379)
 Update state (0x5) verifying install, progress: 50.61 (4821963491 / 9528123379)
 Update state (0x5) verifying install, progress: 52.52 (5004636931 / 9528123379)
 Update state (0x5) verifying install, progress: 53.89 (5134447307 / 9528123379)
 Update state (0x5) verifying install, progress: 57.07 (5437602799 / 9528123379)
 Update state (0x5) verifying install, progress: 59.58 (5676678127 / 9528123379)
 Update state (0x5) verifying install, progress: 61.73 (5881397311 / 9528123379)
 Update state (0x5) verifying install, progress: 64.28 (6124666943 / 9528123379)
 Update state (0x5) verifying install, progress: 67.57 (6438191167 / 9528123379)
 Update state (0x5) verifying install, progress: 70.95 (6760103999 / 9528123379)
 Update state (0x5) verifying install, progress: 73.78 (7029588031 / 9528123379)
 Update state (0x5) verifying install, progress: 76.78 (7315861846 / 9528123379)
 Update state (0x5) verifying install, progress: 80.19 (7640920406 / 9528123379)
 Update state (0x5) verifying install, progress: 83.33 (7940093418 / 9528123379)
 Update state (0x5) verifying install, progress: 86.82 (8272492010 / 9528123379)
 Update state (0x5) verifying install, progress: 90.34 (8608036330 / 9528123379)
 Update state (0x5) verifying install, progress: 93.80 (8937289194 / 9528123379)
 Update state (0x5) verifying install, progress: 97.27 (9267590634 / 9528123379)
Success! App '2430930' fully installed.
Starting the ARK: Survival Ascended dedicated server...
Start parameters: TheIsland_WP?listen?Port=7777?RCONPort=27020?RCONEnabled=True -WinLiveMaxPlayers=10
esync: up and running.
Failed to read /etc/machine-id, error Invalid argument.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
gameserver@asa-server-1:~> echo $?
0

Here the ShooterGameLog.log:

[2023.11.15-00.33.53:440][  0]Log file open, 11/15/23 00:33:53
[2023.11.15-00.33.53:440][  0]LogMemory: Platform Memory Stats for WindowsServer
[2023.11.15-00.33.53:440][  0]LogMemory: Process Physical Memory: 318.18 MB used, 323.07 MB peak
[2023.11.15-00.33.53:440][  0]LogMemory: Process Virtual Memory: 271.34 MB used, 271.34 MB peak
[2023.11.15-00.33.53:440][  0]LogMemory: Physical Memory: 8409.22 MB used,  7599.51 MB free, 16008.73 MB total
[2023.11.15-00.33.53:440][  0]LogMemory: Virtual Memory: 12034.05 MB used,  7976.68 MB free, 20010.73 MB total
[2023.11.15-00.33.54:548][  0]ARK Version: 26.11
[2023.11.15-00.33.55:635][  0]Primal Game Data Took 0.74 seconds
[2023.11.15-00.33.56:270][  0]Server Initializing with BattlEye Anti-Cheat Protection. If you do not wish to use BattlEye, please launch with -NoBattlEye
[2023.11.15-00.33.56:280][  0]BattlEye successfully started.
[2023.11.15-00.33.56:303][  0]Server: "ARK #734612" has successfully started!
[2023.11.15-00.34.33:493][  0]Commandline:  TheIsland_WP?listen?Port=7777?RCONPort=27020?RCONEnabled=True -WinLiveMaxPlayers=10
[2023.11.15-00.34.33:493][  0]Full Startup: 41.08 seconds
[2023.11.15-00.34.33:493][  0]Number of cores 6
[2023.11.15-00.34.41:195][  1]wp.Runtime.HLOD = "1"
mschnitzer commented 1 year ago

I don't know where the issue is, but since you are using Windows anyway, I'd recommend sticking to the native binaries without having docker in between or switch to a Linux host completely.

Why did you decide not going with the native way of hosting an ASA server on Windows?

duartejbrito commented 1 year ago

@SirGallahad is using Windows. I'm using a VPS with linux as OS and portainer to manage dockers.

mschnitzer commented 1 year ago

Ah sorry, your profile pictures looked almost identicial when scrolling down in this thread, that confused me.

So we recently figured out that such strange behavior is most of the times caused by the host cpu's not passed through to the virtual machine. Is it a virtual machine you created on a dedicated host or is the VPS itself rented?

duartejbrito commented 1 year ago

VPS rented, on contabo

mschnitzer commented 1 year ago

I'm unable to reproduce your issue to be honest. I was thinking you probably ran into those two identical issues:

However, I'm not 100% sure, as I don't know how Contabo does their virtualization. You should probably ask them or rent another server from a different provider and test it out.

Just to be clear: The messages from the log are not errors. Everyone gets the same log messages (including myself). This is not the reason the container exits. It fails somewhere in proton in this line:

$STEAM_COMPAT_DIR/$PROTON_DIR_NAME/proton run ArkAscendedServer.exe $ASA_START_PARAMS
duartejbrito commented 1 year ago

No problem, let's close the issue then.