mbround18 / valheim-docker

Valheim Docker powered by Odin. The Valheim dedicated gameserver manager which is designed with resiliency in mind by providing automatic updates, world backup support, and a user friendly cli interface.
https://hub.docker.com/r/mbround18/valheim
BSD 3-Clause "New" or "Revised" License
767 stars 82 forks source link

Can't start container due to lack of network. #658

Closed beltet closed 1 year ago

beltet commented 1 year ago

Hi! I cant seem to get the container working. Been at it for quite a while now...

The container just keeps rebooting. And don't ever start the server application.

Here is the docker-compose(the ubuntu container is only there to test network inside of docker network).:

version: "3"
services:
# Valheim
  valheim:
    image: mbround18/valheim:latest
    container_name: valheim
    ports:
      - 2456:2456/udp
      - 2457:2457/udp
      - 2458:2458/udp
    environment:
      - PORT=2456
      - NAME="HELLMAR"
      - WORLD="World Of Hellmar"
      - PASSWORD="*******"
      - TZ=Europe/Stockholm
      - PUBLIC=1
      - AUTO_UPDATE=1
      - AUTO_UPDATE_SCHEDULE="0 3 * * *"
      - AUTO_BACKUP=1
      - AUTO_BACKUP_SCHEDULE="0 5 * * *"
      - AUTO_BACKUP_REMOVE_OLD=1
      - AUTO_BACKUP_DAYS_TO_LIVE=7
#      - AUTO_BACKUP_ON_UPDATE=1
#      - AUTO_BACKUP_ON_SHUTDOWN=1
      - ADDRESS=limestone.it
      - HTTP_PORT=2460
    volumes:
      - /home/bjohel/docker/valheim/saves:/home/steam/.config/unity3d/IronGate/Valheim
      - /home/bjohel/docker/valheim/server:/home/steam/valheim
      - /home/bjohel/docker/valheim/backups:/home/steam/backups
    restart: unless-stopped

  ubuntu:
    image: ubuntu:latest
    container_name: ubuntu
    restart: on-failure
    command: ["sleep","infinity"]

Here is the log output:

[Valheim][root] : ###########################################################################
[Valheim][root] : Valheim Server - Tue 31 Jan 2023 06:48:05 PM CET
[Valheim][root] : Initializing your container...
[Valheim][root] : You must be in development. Good luck!
[Valheim][root] : ###########################################################################
[Valheim][root] : Switching UID and GID
[Valheim][root] : usermod: no changes
[Valheim][root] :
Configuring Preset Env
Preset Env Configured
[Valheim][root] : Auto Update Enabled...
[Valheim][root] : Auto Update Schedule: "0 3 * * *"
[Valheim][root] : Auto Backup Enabled...
[Valheim][root] : Auto Backup Schedule: "0 5 * * *"
[Valheim][root] : Setting up file systems
[Valheim][root] : Navigating to steam home...
[Valheim][root] : Launching as steam...
[Valheim][steam]: ###########################################################################
[Valheim][steam]: Valheim Server - Tue 31 Jan 2023 06:48:05 PM CET
[Valheim][steam]: STEAM_UID 1000 - STEAM_GUID 1000
[Valheim][steam]: Installing Valheim via odin 1.5.3...
[Valheim][steam]: ###########################################################################
[Valheim][steam]: Variables loaded.....
[Valheim][steam]: Port: 2456
[Valheim][steam]: Name: HELLMAR
[Valheim][steam]: World: World Of Hellmar
[Valheim][steam]: Public: 1
[Valheim][steam]: With Crossplay:
[Valheim][steam]: Password: (REDACTED)
[Valheim][steam]: Running Install...
[ODIN][INFO]  - Installing 896660 to /home/steam/valheim
[ODIN][INFO]  - steamcmd found in path
Redirecting stderr to '/home/steam/.steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
KeyValues Error: LoadFromBuffer: missing {   (current key: '<html>') in file manifest [offset: 17]

../tier1/KeyValues.cpp (2925) : Assertion Failed: Error while parsing text KeyValues for resource manifest
[----] Verifying installation...
[  0%] Downloading Update...
[  0%] Checking for available update...
KeyValues Error: LoadFromBuffer: missing {   (current key: '<html>') in file manifest [offset: 17]

../tier1/KeyValues.cpp (2925) : Assertion Failed: Error while parsing text KeyValues for resource manifest
[----] !!! Fatal Error: Steamcmd needs to be online to update.   Please confirm your network connection and try again.
threadtools.cpp (3294) : Assertion Failed: Illegal termination of worker thread 'Thread(0x0x583d3320/0x0xf7760b'
[ODIN][ERROR] - Exited with http code: 254
beltet commented 1 year ago

Seems like the Ubuntu container have network, so the problem is isolated to this container...

spannerman79 commented 1 year ago

Did you attempt to try network_mode: host for diagnostic purposes?

Cause if that works it means your host config/ipfirewall/etc is FUBAR and beyond the help of this issue tracker.

beltet commented 1 year ago

Did you attempt to try network_mode: host for diagnostic purposes?

Cause if that works it means your host config/ipfirewall/etc is FUBAR and beyond the help of this issue tracker.

Ok. I have now tested it, and I cant get any connection either. Will try to poke the firewall on the host and on my network and see if the problem is there.

EDIT: I've used network: host and changed the resolv.conf to include cloudflare & Google DNS. Then it works. But when I remove the network: host I can't connect any more. Will investigate and report.

EDIT2: I've tried removing "network: host" from the compose file and then it fails, I have system pruned everything so that shouldn't be any dangling containers that can interfere. I've also tried adding nameservers in /etc/network/interfaces but to no avail. The only thing that solves this is changing /etc/resolv.conf and making it immutable with chattr +i /etc/resolv.conf and also add network: "host" in docker compose file

spannerman79 commented 1 year ago

This is outside the scope of this issue tracker.

It is assumed you have a functional network stack, correctly set up docker ect before starting.

Null and void issue.