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.94k stars 272 forks source link

Synology: new image version fails to start. Uses old version's CMD #208

Closed belleDESiRE closed 3 years ago

belleDESiRE commented 3 years ago

On my synology I get this error after updating to the latest version:

Start container Valheim-Server failed: {"message":"OCI runtime create failed: container_linux.go:345: starting container process caused \"exec: \\"/usr/bin/supervisord\\": stat /usr/bin/supervisord: no such file or directory\": unknown"}.

laneyweb commented 3 years ago

I have the same error after updating to the latest build.

Start container lloesche-valheim-server1 failed: {"message":"OCI runtime create failed: container_linux.go:345: starting container process caused \"exec: \\"/usr/bin/supervisord\\": stat /usr/bin/supervisord: no such file or directory\": unknown"}.

EnigmaRaptor commented 3 years ago

Same here. Lucky for me my playerbase was playing the Overwatch update tonight.

laneyweb commented 3 years ago

OK, I have it running now again. In the end I decided to delete the docker container (after double checking the config/world data is persistent). I then built a new container with all the settings I had on the other one. It started up OK and is running now.

Just in case this helps anyone else, I'm not sure what happened but I run on a Synology using the UI there and Portainer to manage the containers. I assume there was a config issue when getting the latest build updated.

Also, yesterday, I had tried to add the persistent -v $HOME/valheim-server/data:/opt/valheim \ - I didnt use that on the new build. Maybe a coincidence.

belleDESiRE commented 3 years ago

OK, I have it running now again. In the end I decided to delete the docker container (after double checking the config/world data is persistent). I then built a new container with all the settings I had on the other one. It started up OK and is running now.

Just in case this helps anyone else, I'm not sure what happened but I run on a Synology using the UI there and Portainer to manage the containers. I assume there was a config issue when getting the latest build updated.

Also, yesterday, I had tried to add the persistent -v $HOME/valheim-server/data:/opt/valheim - I didnt use that on the new build. Maybe a coincidence.

laneyweb, tx for the tip!

I also deleted the container and the image, re-downloaded the image and recreated the container. That fixed the issue for me also

note that the thing that changed between the exported config files was the following line: "cmd" : "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf" ---> "cmd" : "/usr/local/sbin/bootstrap"

lloesche commented 3 years ago

When you update the container you'll also have to use that container's cmd. Using a new container version with an old container's cmd will likely break things. I'm assuming that's some odd Synology specific behavior as Docker by default does not have any state or knowledge of old cmd and just uses the cmd of the image it is running.

belleDESiRE commented 3 years ago

Yep,

up until now the procedure you shared in the readme.md for synology worked every time (re-download latest image, clear container and start)

It only broke with this latest version, so maybe something to mention in the synology section as a potential solution for future issues?

lloesche commented 3 years ago

@belleDESiRE already done. Added a dedicated section to the README right underneath the update procedure: https://github.com/lloesche/valheim-server-docker#error-after-download-of-new-container-image

EnigmaRaptor commented 3 years ago

Just a comment for clarification. I am running Docker on a Dell Elite Desk with Ubuntu, and I had this problem. It is definitely not a Synology exclusive issue. I resolved the issue by switching the option in Portainer to default, which reset the entrypoint to "/usr/local/sbin/bootstrap". It had previously been set to "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf" in the container from when I first deployed it. Though, unlike all of my other containers, this container sets the entrypoint to override when it deploys for some reason. So I expect that if the entrypoint changes again in the future I will have to redeploy and manually set to default to get it to pick up the new configuration.

lloesche commented 3 years ago

@EnigmaRaptor yup we have a whole section in the README now https://github.com/lloesche/valheim-server-docker#changing-startup-cmd-in-portainer for Portainer users.

I also pushed a fix that makes it so the old CMD redirects to the new CMD but first prints a warning message notifying users.