valheim-server-docker: Startup fails with setuptools error
Just started happening this morning. From the supervisor logs:
Starting Valheim Server [test]...
Error response from daemon: No such container: valheim-test
Error: No such container: 5.4.0-88-genericalheim-test
Started Valheim Server [test].
latest: Pulling from lloesche/valheim-server
Digest: sha256:7e8f73d1c4c1d828822cc287126a976f6cac4bf2df088720f58884cce1a42ece
Status: Image is up to date for ghcr.io/lloesche/valheim-server:latest
INFO - Setting uid:gid of valheim to 1000:1000
INFO - Setting timezone Etc/UTC
INFO - Setting up syslogd - logging to stdout
Traceback (most recent call last):
File "/usr/local/bin/supervisord", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3191, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'setuptools' distribution was not found and is required by supervisor
valheim@test.service: Main process exited, code=exited, status=1/FAILURE
valheim@test.service: Failed with result 'exit-code'.
valheim@test.service: Scheduled restart job, restart counter is at 18.
Stopped Valheim Server [test].
Related to 4318021ff9c83575bcc0334e1c97afecb62beb32 and https://github.com/lloesche/valheim-server-docker/pull/445?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 18
- Comments: 21 (3 by maintainers)
Commits related to this issue
- Pin version of docker image. To work around https://github.com/lloesche/valheim-server-docker/issues/447 — committed to ericljiang/valheim-server-cdk-app by ericljiang 2 years ago
Working around currently by pulling the previous image by digest ID: ghcr.io/lloesche/valheim-server@sha256:e3fb5d2812841123f4e3185a64a1055261e23655632413a49fdf2486475fb9f7
Snippet from unit file:
I very much appreciate the time you take to maintain this image. For the folks who like to choose when to introduce upgrade instability (work/life balance, whatever reason) would consider making release tags when there are material changes so that otherwise innocuous changes (server reboots) or more complicated changes (k8s/docker upgrades) on your users’ side don’t end up with unexpected failures? Again, I have no room to really complain as a simple consumer of your work, I’m just asking that you consider whether adding tagged releases would fit into your workflow. Either way, I appreciate your efforts.
Server starts without problems after installing python3-setuptools in the Dockerfile. PR created, #448.
I would recommend downgrading as suggested by other comments as the best way to get your server up and running, but I’ll also write what I did below in case anyone could find it useful.
The easiest way is to just edit the file named
Dockerfile
and addpython3-setuptools
to the list of packages installed byapt-get
, as I have done hereAfter adding it to the
Dockerfile
you need to rebuild the image. You need to name (tag) the image you build to be able to tell whatever you are starting your docker container with (docker-compose in my case) to use the one you have built.docker build -t yourname/valheim-server-docker .
The you edit your
docker-compose.yaml
file and change the image line and set it toyourname/valheim-server-docker
so that it uses the one you just built.Done, now you just run
docker-compose up -d
as usual. The downside of doing this is that you will probably get a merge conflict next time you try to pull the repo after lloesche has updated his file, and you will no longer be using the latest version of his container, so you won’t get any future updates.So downgrade for the time being, and wait for lloesche to implement the fix in his image.
thx for the fix @dahlo
Can confirm works now
Works fine now after installing the new update. Huge thx @lloesche
The problem is solved!
☝️ That’s your workaround. If you’re using docker-compose, put
@sha256:e3fb5d2812841123f4e3185a64a1055261e23655632413a49fdf2486475fb9f7
at the end of this line