lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.92k stars 269 forks source link

Valheim server won't update to 0.211.11 #522

Open mdbdb opened 1 year ago

mdbdb commented 1 year ago

The Valheim server is stuck at version 0.211.9 for me:

root@valheim:/valheim-srv# docker logs valheim-srv_valheim_1 | grep 'Valheim version'
Nov 19 10:32:07 supervisord: valheim-server 11/19/2022 10:32:07: Valheim version:0.211.9@0.9.9.9

However, the current version should actually be 0.211.11, if I'm not mistaken.

ValheimPlus is activated, but that shouldn't be the problem.

My docker-compose.yml:

version: "3"

services: 
  valheim: 
    image: ghcr.io/lloesche/valheim-server
    cap_add:
      - sys_nice
    volumes: 
      - /valheim-srv/config:/config
      - /valheim-srv/data:/opt/valheim
    ports: 
      - "2456-2457:2456-2457/udp"
      - "9001:9001/tcp"
    env_file:
      - /valheim-srv/valheim.env
    restart: always
    stop_grace_period: 2m

My valheim.env:

SERVER_NAME=xxx
WORLD_NAME=xxx
SERVER_PASS=""
SERVER_PUBLIC=false
TZ=Europe/Berlin
BACKUPS=true
VALHEIM_PLUS=true

So far I have had no problems with updates. Any advice?

schildbach commented 1 year ago

Indeed, I'm on 0.211.11 and had a problem free multi-hour play session yesterday.

# docker-compose logs | grep 'Valheim version'
valheim_1  | Nov 17 12:03:38 supervisord: valheim-server 11/17/2022 12:03:38: Valheim version:0.211.11
lloesche commented 1 year ago

I just checked my local server and it's telling me

valheim-server-valheim-1  | Nov 20 02:18:40 supervisord: valheim-server 11/20/2022 02:18:40: Valheim version:0.211.11

What does your log say? The valheim-update script is pretty naive. It just calls Steam client every so often and let's Steam do the updating. If the log is too convoluted try restarting the container and check what Steam client prints during startup. See if there are maybe any errors that would prevent Steam from updating the server files. Maybe permission issues or something like that.

corbin-lounsbury commented 1 year ago

+1 I am experiencing the same issue. Confirmed no permissions changes or issues. here is my updater log:

e114a0f5ea3e64b70e3a03c639/diff,workdir=/var/lib/docker/overlay2/05e37d7ddc194f454030c0d254488eac8e1a2de114a0f5ea3e64b70e3a03c639/work 0 0
/dev/mapper/centos-root /config xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
/dev/mapper/centos-root /opt/valheim xfs rw,seclabel,relatime,attr2,inode64,noquota 0 0
DEBUG - [40] - No players connected to Valheim server
INFO - Downloading/updating/validating Valheim server from Steam
Redirecting stderr to '/home/valheim/Steam/logs/stderr.txt'
src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
[  0%] Checking for available updates...
src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.
src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.

Additional logs

pdates...
src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.
src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
CWorkThreadPool::StartWorkThread: Thread creation failed.
src/tier0/threadtools.cpp (4122) : Probably deadlock or failure waiting for thread to initialize.
Thread failed to initialize
[----] Verifying installation...
[  0%] Downloading update...
[  0%] Checking for available updates...
[----] !!! Fatal Error: Steamcmd needs to be online to update. Please confirm your network connection and try again.
src/common/workthreadpool.cpp (612) : pWorkThread->m_bFinished is false but thread is not running
src/common/workthreadpool.cpp (612) : pWorkThread->m_bFinished is false but thread is not running
INFO - Valheim Server is already the latest version
DEBUG - [41] - Writing file to start Valheim server

I verified that I can ping out to the internet from the docker host as well as from within the container itself.

mdbdb commented 1 year ago

What does your log say?

The connection problems corbin-lounsbury describes do not seem to occur here.

Just restartet the container:

# docker logs valheim-srv_valheim_1 | grep 'valheim-updater'

2022-11-24 03:39:30,327 INFO spawned: 'valheim-updater' with pid 48
Nov 24 03:39:30 supervisord: valheim-updater DEBUG - [48] - Running Valheim Server updater as user valheim uid 0
Nov 24 03:39:30 supervisord: valheim-updater DEBUG - [48] - Kernel: Linux bb0481e00719 5.15.74-1-pve #1 SMP PVE 5.15.74-1 (Mon, 14 Nov 2022 20:17:15 +0100) x86_64 GNU/Linux
Nov 24 03:39:30 supervisord: valheim-updater DEBUG - [48] - Found CPU with 4276.170 MHz
Nov 24 03:39:30 supervisord: valheim-updater DEBUG - [48] - Memory total/free/available: 16205756/2524948/6925264
Nov 24 03:39:30 supervisord: valheim-updater DEBUG - [48] - Storage configuration:
Nov 24 03:39:30 supervisord: valheim-updater Filesystem                        Size  Used Avail Use% Mounted on
Nov 24 03:39:30 supervisord: valheim-updater overlay                            16G  7.6G  7.3G  51% /
Nov 24 03:39:30 supervisord: valheim-updater /dev/mapper/pve-vm--110--disk--0   16G  7.6G  7.3G  51% /config
Nov 24 03:39:30 supervisord: valheim-updater udev                              7.7G     0  7.7G   0% /dev/tty
Nov 24 03:39:30 supervisord: valheim-updater overlay / overlay rw,relatime,lowerdir=/var/lib/docker/overlay2/l/6KPCJSLBQKEONTESRTMOXUVNMA:/var/lib/docker/overlay2/l/42DN6GXPGQAVO5JWMLYFUHT2XY:/var/lib/docker/overlay2/l/GUO4FHOTQC47S3ZTZX3FOFSDOB:/var/lib/docker/overlay2/l/ES67ZJV7QVAFT34AUHZH67OZES:/var/lib/docker/overlay2/l/ZI3KUTRRCQO5NZEHLGWHHQ22Y2,upperdir=/var/lib/docker/overlay2/2b4c2366896b3c51c6208a7cf9d155a9882a21cdd0d4eebc65c2c42c796a2757/diff,workdir=/var/lib/docker/overlay2/2b4c2366896b3c51c6208a7cf9d155a9882a21cdd0d4eebc65c2c42c796a2757/work,userxattr 0 0
Nov 24 03:39:30 supervisord: valheim-updater /dev/mapper/pve-vm--110--disk--0 /config ext4 rw,relatime,stripe=16 0 0
Nov 24 03:39:30 supervisord: valheim-updater /dev/mapper/pve-vm--110--disk--0 /opt/valheim ext4 rw,relatime,stripe=16 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /dev/null devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /dev/random devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /dev/full devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /dev/tty devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /dev/zero devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /dev/urandom devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /proc/kcore devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /proc/keys devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater udev /proc/timer_list devtmpfs rw,nosuid,relatime,size=8069184k,nr_inodes=2017296,mode=755,inode64 0 0
Nov 24 03:39:30 supervisord: valheim-updater DEBUG - [48] - Valheim updater was just started - skipping connected players check
Nov 24 03:39:30 supervisord: valheim-updater INFO - Downloading/updating/validating Valheim server from Steam
2022-11-24 03:39:31,473 INFO success: valheim-updater entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Nov 24 03:39:31 supervisord: valheim-bootstrap valheim-updater: started
Nov 24 03:39:41 supervisord: valheim-updater Redirecting stderr to '/home/valheim/Steam/logs/stderr.txt'
Nov 24 03:39:41 supervisord: valheim-updater [  0%] Checking for available updates...
Nov 24 03:39:41 supervisord: valheim-updater [----] Downloading update (95 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [  0%] Downloading update (2,974 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [  5%] Downloading update (6,330 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 11%] Downloading update (8,590 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 14%] Downloading update (10,833 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 18%] Downloading update (12,934 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 22%] Downloading update (15,056 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 26%] Downloading update (17,304 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 30%] Downloading update (19,313 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 33%] Downloading update (21,389 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 37%] Downloading update (23,570 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 41%] Downloading update (25,579 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 44%] Downloading update (27,686 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 48%] Downloading update (29,916 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 52%] Downloading update (31,980 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 55%] Downloading update (33,961 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 59%] Downloading update (36,169 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 63%] Downloading update (38,170 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 66%] Downloading update (40,119 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 69%] Downloading update (42,281 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 73%] Downloading update (43,647 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 76%] Downloading update (44,736 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 77%] Downloading update (45,914 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 80%] Downloading update (47,093 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 82%] Downloading update (48,191 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 83%] Downloading update (49,461 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 86%] Downloading update (50,619 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 88%] Downloading update (51,732 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 90%] Downloading update (52,982 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 92%] Downloading update (54,159 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 94%] Downloading update (55,213 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 96%] Downloading update (56,430 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [ 98%] Downloading update (57,376 of 57,376 KB)...
Nov 24 03:39:41 supervisord: valheim-updater [100%] Download complete.
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Extracting package...
Nov 24 03:39:41 supervisord: valheim-updater [----] Extracting package...
Nov 24 03:39:41 supervisord: valheim-updater [----] Extracting package...
Nov 24 03:39:41 supervisord: valheim-updater [----] Extracting package...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Installing update...
Nov 24 03:39:41 supervisord: valheim-updater [----] Cleaning up...
Nov 24 03:39:41 supervisord: valheim-updater [----] Update complete, launching Steamcmd...
Nov 24 03:39:42 supervisord: valheim-updater Redirecting stderr to '/home/valheim/Steam/logs/stderr.txt'
Nov 24 03:39:42 supervisord: valheim-updater [  0%] Checking for available updates...
Nov 24 03:39:42 supervisord: valheim-updater [----] Verifying installation...
Nov 24 03:39:42 supervisord: valheim-updater Steam Console Client (c) Valve Corporation - version 1669249397
Nov 24 03:39:42 supervisord: valheim-updater -- type 'quit' to exit --
Nov 24 03:39:42 supervisord: valheim-updater Loading Steam API...OK
Nov 24 03:39:42 supervisord: valheim-updater 
Nov 24 03:39:42 supervisord: valheim-updater Connecting anonymously to Steam Public...
Nov 24 03:39:48 supervisord: valheim-updater OK
Nov 24 03:39:48 supervisord: valheim-updater Waiting for client config...OK
Nov 24 03:39:48 supervisord: valheim-updater Waiting for user info...
Nov 24 03:39:57 supervisord: valheim-updater OK
Nov 24 03:39:57 supervisord: valheim-updater  Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Nov 24 03:39:57 supervisord: valheim-updater  Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Nov 24 03:39:57 supervisord: valheim-updater  Update state (0x5) verifying install, progress: 23.39 (306709411 / 1311092914)
Nov 24 03:39:57 supervisord: valheim-updater  Update state (0x5) verifying install, progress: 62.97 (825539194 / 1311092914)
Nov 24 03:39:57 supervisord: valheim-updater  Update state (0x5) verifying install, progress: 99.47 (1304209234 / 1311092914)
Nov 24 03:39:57 supervisord: valheim-updater Success! App '896660' fully installed.
Nov 24 03:39:57 supervisord: valheim-updater .d..t...... ./
Nov 24 03:39:57 supervisord: valheim-updater INFO - Valheim Server is already the latest version
Nov 24 03:39:57 supervisord: valheim-updater DEBUG - [48] - ValheimPlus is enabled - running updater
Nov 24 03:39:58 supervisord: valheim-updater DEBUG - [138] - Local ValheimPlus archive is identical to remote archive and was successfully installed - no update required
Nov 24 03:39:58 supervisord: valheim-updater DEBUG - [48] - Writing file to start Valheim server
Nov 24 03:40:08 supervisord: valheim-updater valheim-server: started

It looks like everything is going through fine, except that no update is being installed as the version is probably the latest.

# docker logs valheim-srv_valheim_1 | grep 'Valheim version'

Nov 24 03:40:05 supervisord: valheim-server 11/24/2022 03:40:05: Valheim version:0.211.9@0.9.9.9

shad-lp commented 1 year ago

@mdbdb I am in the exact same situation as you, my valheim server did update frequently through the previous version updates, but right now it remains stuck on the 0.211.9 version, despite I didn't add -beta default_old as a STEAM_ARGS command.

My compose :

version: '2.1'
services:

   valheim-plus-server:
      image: lloesche/valheim-server
      container_name: valheim-plus-server
      hostname: valheim-plus-server
      networks:
         - net-proxy
         - net-notif
      cap_add:
         - CAP_SYS_NICE
      environment:
         # Configuration
         - PUID=1000
         - PGID=1000
         - SERVER_NAME=REDACTED
         - SERVER_PASS=REDACTED
         - SERVER_PORT=2456
         - WORLD_NAME=REDACTED
         - SERVER_PUBLIC=false
         - RESTART_CRON=45 5 * * *
         - RESTART_IF_IDLE=true
         - TZ=Europe/Brussels
         # Admin access (Steam ID)
         - ADMINLIST_IDS=XXXXXXXXXXXX YYYYYYYYYYYYY
         # Update configuration
         - UPDATE_CRON=30 6 * * *
         - UPDATE_IF_IDLE=true
         # Backups configuration
         - BACKUPS=true
         - BACKUPS_CRON=10 */6 * * *
         - BACKUPS_DIRECTORY=/config/backups
         - BACKUPS_MAX_AGE=5
         - PERMISSIONS_UMASK=022
         # Supervisord
         - SUPERVISOR_HTTP=true
         - SUPERVISOR_HTTP_PORT=9001
         # Discord
         - DISCORD_WEBHOOK=https://discord.com/api/webhooks/XXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
         ## Bootstrap
         - 'PRE_BOOTSTRAP_HOOK=curl -X POST -d "tag=botValheim&body=Server starting up..." http://apprise-api:8000/notify/apprise'
         ## Listening
         - 'POST_SERVER_LISTENING_HOOK=curl -X POST -d "tag=botValheim&body=Server __READY__..." http://apprise-api:8000/notify/apprise' 
         ## Shutdown
         - 'PRE_SERVER_SHUTDOWN_HOOK=curl -X POST -d "tag=botValheim&body=Shutting down server..." http://apprise-api:8000/notify/apprise'
         ## Restarting
         - 'PRE_RESTART_HOOK=curl -X POST -d "tag=botValheim&body=Restarting server..." http://apprise-api:8000/notify/apprise'
         # Mods
         - VALHEIM_PLUS=true
         - VPCFG_AdvancedBuildingMode_enabled=true
         - VPCFG_AdvancedEditingMode_enabled=true
         - VPCFG_Building_enabled=true
         - VPCFG_Building_enableAreaRepair=true
         - VPCFG_Camera_enabled=true
         - VPCFG_Camera_cameraFOV=65
         - VPCFG_Chat_enabled=true
         - VPCFG_Chat_outOfRangeShoutsDisplayInChatWindow=true
         - VPCFG_Chat_defaultNormalDistance=7500
         - VPCFG_FireSource_enabled=true
         - VPCFG_FireSource_torches=true
         - VPCFG_FireSource_fires=true
         - VPCFG_Game_enabled=true
         - VPCFG_Game_bigPortalNames=true
         - VPCFG_Hud_enabled
         - VPCFG_Hud_showRequiredItems=true
         - VPCFG_Hud_experienceGainedNotifications=true
         - VPCFG_Hud_displayBowAmmoCounts=2
         - VPCFG_Map_enabled=true
         - VPCFG_Map_shareMapProgression=true
         - VPCFG_Map_preventPlayerFromTurningOffPublicPosition=true
         - VPCFG_Map_shareAllPins=true
         - VPCFG_Map_displayCartsAndBoats=true
         - VPCFG_GridAlignment_enabled=true
         - VPCFG_Items_enabled=true
         - VPCFG_Items_noTeleportPrevention=true      
         # In case of broken update
         #- STEAMCMD_ARGS=-beta default_old
      env_file:
         - stack.env
      ports:
         - 2456:2456/udp
         - 2457:2457/udp
         # if not in net-proxy network
         #- 9001:9001/tcp
      volumes:
         - /opt/valheim-plus-server/config:/config
         - /opt/valheim-plus-server/data:/opt/valheim
      labels:
         # watchtower label only monitoring
         - 'com.centurylinklabs.watchtower.enable=true'
      restart: unless-stopped

networks:

   net-proxy:
      external: true

   net-notif:
      external: true

The server is restarted on a daily basis at 5:45am, still :

Nov 24 05:45:29 supervisord: valheim-server 11/24/2022 05:45:29: Valheim version:0.211.9@0.9.9.9

mdbdb commented 1 year ago

Okay, now my server is running version 0.211.11. What did I do?

1) Stopped Valheim server (docker-compose down) 2) Removed container & image (docker rm valheim-srv_valheim_1 && docker image rm ghcr.io/lloesche/valheim-server:latest) 3) content of the data directory deleted (rm -r data/*) (since all settings are stored inside config/, this should not be a problem) 4) restarted Valheim server (docker-compose up -d) 5) Waited a bit 6) Version 0.211.11! Nov 26 12:18:48 supervisord: valheim-server 11/26/2022 12:18:48: Valheim version:0.211.11@0.9.9.9

corbin-lounsbury commented 1 year ago

Okay, now my server is running version 0.211.11. What did I do?

1) Stopped Valheim server (docker-compose down)

2) Removed container & image (docker rm valheim-srv_valheim_1 && docker image rm ghcr.io/lloesche/valheim-server:latest)

3) content of the data directory deleted (rm -r data/*) (since all settings are stored inside config/, this should not be a problem)

4) restarted Valheim server (docker-compose up -d)

5) Waited a bit

6) Version 0.211.11!

Nov 26 12:18:48 supervisord: valheim-server 11/26/2022 12:18:48: Valheim version:0.211.11@0.9.9.9

Damn, I tried doing something similar and it didn't work. I ended up just deploying a new VM and migrating my world. Updated just fine.

shad-lp commented 1 year ago

@mdbdb I can confirm it works. 👍