valheim-server-docker: Cannot launch ValheimPlus on my Synology 1520+ using Docker

Hi everyone,

Just tried to spin up my docker hosting my Valheim server and enabling the ValheimPlus mod (after having played already a bit the vanilla version). Everything seems to go well: installing, getting the mod, the config files are created, but once it tries to start and load the different configuration, it fails repeateadly when launching the server with an epic segfault, it then retries a few times and ends up giving up.

2023-04-03T10:30:48.126163375Z,stdout,Apr  3 10:30:48 supervisord: valheim-server /usr/local/bin/valheim-server: line 123:   167 Segmentation fault      (core dumped) LD_PRELOAD=$SERVER_LD_PRELOAD "$valheim_server" -nographics -batchmode -name "$SERVER_NAME" -port "$SERVER_PORT" -world "$WORLD_NAME" -public "$SERVER_PUBLIC" "${password_args[@]}" $SERVER_ARGS > >(filter) 2>&1

2023-04-03T10:30:48.016978807Z,stdout,"Apr  3 10:30:48 supervisord: valheim-server #2  0x00000040580d65 in (wrapper managed-to-native) UnityEngine.Texture2D:GetPixelImpl_Injected (UnityEngine.Texture2D,int,int,int,UnityEngine.Color&)
"
2023-04-03T10:30:48.016917377Z,stdout,"Apr  3 10:30:48 supervisord: valheim-server #1  0x007f12a140b2c3 in Texture2D_CUSTOM_GetPixelImpl_Injected(ScriptingBackendNativeObjectPtrOpaque*, int, int, int, int, ColorRGBAf&)
"
2023-04-03T10:30:48.016869140Z,stdout,Apr  3 10:30:48 supervisord: valheim-server #0  0x007f12a0320140 in funlockfile

2023-04-03T10:30:48.016688461Z,stdout,Apr  3 10:30:48 supervisord: valheim-server Obtained 3 stack frames.

2023-04-03T10:30:48.007874669Z,stdout,Apr  3 10:30:48 supervisord: valheim-server Caught fatal signal - signo:11 code:1 errno:0 addr:0x3fb

2023-04-03T10:30:48.007724772Z,stdout,Apr  3 10:30:48 supervisord: valheim-server GetPixel called on an undefined mip (valid values are 0 - 6

2023-04-03T10:30:47.920064557Z,stdout,Apr  3 10:30:47 supervisord: valheim-server 04/03/2023 10:30:47: Builder started

You can see in the logs attached if you want more details, but on my side I am puzzled as to why it segfaults like this…

Valheim-Server.csv

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16

Most upvoted comments

@Marc-- @nkornaros The issue is actually with the latest Valheim+ release. issue #803

If you use the “community fix version” (as suggested in the linked issue) the server instance should start fine.

Use the VALHEIM_PLUS_REPO environment variable when starting your container to point to the community release of Valheim+.

$ docker run -d \
    --name valheim-server \
    --cap-add=sys_nice \
    --stop-timeout 120 \
    -p 2456-2457:2456-2457/udp \
    -v $HOME/valheim-server/config:/config \
    -v $HOME/valheim-server/data:/opt/valheim \
    -e SERVER_NAME="My Server" \
    -e WORLD_NAME="Neotopia" \
    -e SERVER_PASS="secret" \
    -e VALHEIM_PLUS=true \
    -e VALHEIM_PLUS_REPO="Grantapher/ValheimPlus" \
    ghcr.io/lloesche/valheim-server

Or just add VALHEIM_PLUS_REPO="Grantapher/ValheimPlus" in your valheim.env if you are using docker-compose.

Ah! @Nirinjan it worked! Thanks so much. So the issue was basically that my image was not up to date and that in Syno to update it it’s a bit tricky as you need to:

  1. Stop the container
  2. Redownload the image via the Registry page in Docker app
  3. Duplicate the settings of the original container
  4. Backup the port numbers
  5. Delete the old container
  6. Update the port numbers in the new container
  7. Run the new container with the new image

@Nirinjan how can I check the date of image, normally, I already tried to force the download of the newest version of the image, but it’s worth a try

I’m not using a Synology so don’t know if there are any differences but here’s what I did:

 docker image ls

give me the list of images

REPOSITORY                        TAG       IMAGE ID       CREATED         SIZE
ghcr.io/lloesche/valheim-server   latest    101e470a46b3   4 weeks ago     661MB

Then to delete the image, since my image ID is 101e470a46b3, I’d do:

docker image rm 101e

From there docker compose up and it redownloaded the image for me

@nmartin867 I’ll give it a try, I checked the other issues but did not do the match it to my issue thanks for the pointer and I’ll keep you posted.