Closed nkornaros closed 1 year ago
Hi, same behavior for me.
It's working fine without "Plus", but keep restarting with env variable "VALHEIM_PLUS=true"
Apr 3 22:03:59 supervisord: valheim-server DEBUG - [414] - Waiting for server to listen on UDP query port 2457 2023-04-03 22:04:00,099 INFO reaped unknown pid 421 (exit status 0) Apr 3 22:04:00 supervisord: valheim-server /usr/local/bin/valheim-server: line 123: 419 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 Apr 3 22:04:00 supervisord: valheim-server DEBUG - [414] - Valheim server with PID 419 stopped Apr 3 22:04:00 supervisord: valheim-server INFO - Releasing PID file /var/run/valheim/valheim-server.pid Apr 3 22:04:00 supervisord: valheim-server INFO - Shutdown complete 2023-04-03 22:04:01,102 INFO exited: valheim-server (exit status 0; not expected) 2023-04-03 22:04:05,111 INFO spawned: 'valheim-server' with pid 501 2023-04-03 22:04:05,112 INFO reaped unknown pid 495 (exit status 0)
@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.
@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.
@nmartin867 Thank you, it's working great with the community release of Valheim+.
Great job with Valheim server, it makes me try Docker, and now i've a portainer install with 11 containers and i learn a lot !
@Marc-- Glad to hear it's working out. I'm just a Valheim fan myself. Credit for this docker image goes to the repo's owner. ;)
@nmartin867 and anyone who knows, despite using the env variables:
I have the feeling it is not downloading it and using the previous downloaded version, do you know how to force it? Do I have to delete a part of the data folders? Or all of it? See attached logs and screenshot?
Sorry if the question is silly, but I do not want to mess up everything.
2023-04-05T11:21:30.260246436Z,stdout,Apr 5 11:21:30 supervisord: valheim-updater DEBUG - [45] - Writing file to start Valheim server
2023-04-05T11:21:30.259404736Z,stdout,Apr 5 11:21:30 supervisord: valheim-updater DEBUG - [123] - Local ValheimPlus archive is identical to remote archive and was successfully installed - no update required
2023-04-05T11:21:29.259380353Z,stdout,Apr 5 11:21:29 supervisord: valheim-updater DEBUG - [45] - ValheimPlus is enabled - running updater
2023-04-05T11:21:29.259006009Z,stdout,Apr 5 11:21:29 supervisord: valheim-updater INFO - Valheim Server is already the latest version
Actually, @nmartin867 , I used one env variable that enables the docker to re-download the V+ mod (DEBUG_REINSTALL_VALHEIM_PLUS=true) but actually, it seems it does not take the VALHEIM_PLUS_REPO in account as shown in the logs:
It seems to take the default repo and not the one specified in the Environment variables
@nkornaros it definitely will use the repo specified in VALHEIM_PLUS_REPO
. This is happening here. You are storing your env vars in valheim.env
and referencing this in your docker-compose.yaml?
The bash script does, however, check to see if a newer version is available. I'd have to revisit the source code to see if that's the issue. I would suggest creating a fresh image. If you already have worlds you don't want to loose you can copy them into config/worlds_local
.
If you are still having an issue let me know. I can post a docker-compose.yaml and valheim.env that should work.
@nmartin867 I did a few more tests on my side and even put a dumb value in the VALHEIM_PLUS_REPO
environment variable but it is clearly ignored when launching the container (see below).
Wondering if it's something with Syno or something else, I am really stuck here. What I can imagine is forking the project and testing by putting the value hardcoded, but this is super ugly... Any suggestion?
@nkornaros how do you use environment variables with Syno? Is it with an ".env" file? Are the other variables working? WORLD_NAME or SERVER_NAME are easy to check.
I ask because on my setup (Openmediavault/Portainer) I was bothered with the .env file.
Edit: "A picture paints a thousand words"
@nmartin867 On Syno it is also via a web UI see below as you said an image is better than words:
I have indeed tested multiple variables, the world name, the password, the switch for the V+ mod, and the release to use and they work fine, only the repo seems to be ignored.
I need to test one a two other things, but honestly I am not getting why there is such issue...
@nmartin867 tried a few more things, and was able to confirm that the environment variable is properly passed to the container by logging using a terminal and executing the command normally done by the script:
curl -sfSL "https://api.github.com/repos/$VALHEIM_PLUS_REPO/releases/$VALHEIM_PLUS_RELEASE"
and getting the correct value:
https://api.github.com/repos/Grantapher/ValheimPlus/releases/latest
as per the environment variables request it.
I checked also individually the variables by doing an echo $VALHEIM_PLUS_REPO and it gave the correct output.
I am even more lost now... I do not get why when launching the container the script does not take the correct value...
@nkornaros I was running into the same issue as you, the variable looked to be working but it was being ignored. I was able to fix this by deleting the "ghcr.io/lloesche/valheim-server" image from my repo and redownloading it. For whatever reason mine was still from 6 months ago. Now it's from 4 weeks ago and the VALHEIM_PLUS_RELEASE var is working. Hope this helps you.
@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
@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
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:
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.
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