cyrale / project-zomboid

A Project Zomboid server with LinuxGSM.
29 stars 56 forks source link

znet: OnSteamServersConnectFailure when starting PZ server via docker-compose #8

Closed rykugur closed 3 years ago

rykugur commented 3 years ago

Describe the bug When I start the server via docker-compose (file pasted below), I'm getting the following errors in my server-console.txt file:

Failed to read SVNRevision.txt
1609522624861 versionNumber=40.43 demo=false
1609522624864 server name is "rollhaxpz"
1609522624864 map_t.bin does not exist, cannot determine the server's WorldVersion.
1609522624865 Loading networking libraries...
1609522624866 Loading steam_api...
1609522624866 Loading RakNet64...
1609522624867 Loading ZNetJNI64...
1609522624868 znet: ZNet loaded
1609522624868 znet: Compiled with SERVER_STEAMAPI == 0
1609522624868 znet: Starting with bServer == true
1609522624869 znet: SteamAPI initialised successfully
1609522624869 SteamUtils initialised successfully
1609522624878 translator: language is EN
LightingFPS set to 15
1609522624924 reading /home/linuxgsm/Zomboid/Server/rollhaxpz.ini
1609522624925 writing /home/linuxgsm/Zomboid/Server/rollhaxpz.ini
1609522624928 znet: Java_zombie_core_znet_SteamGameServer_Init
1609522625019 znet: SteamGameServer seems to be initialized
1609522625019 znet: Java_zombie_core_znet_SteamGameServer_SetProduct
1609522625019 znet: Java_zombie_core_znet_SteamGameServer_SetGameDescription
1609522625019 znet: Java_zombie_core_znet_SteamGameServer_SetModDir
1609522625019 znet: Java_zombie_core_znet_SteamGameServer_SetDedicatedServer
1609522625019 znet: Java_zombie_core_znet_SteamGameServer_SetMaxPlayerCount
1609522625020 znet: Java_zombie_core_znet_SteamGameServer_SetServerName 'Project Zomboid Server'
1609522625020 znet: Java_zombie_core_znet_SteamGameServer_SetMapName 'Muldraugh, KY'
1609522625020 znet: Java_zombie_core_znet_SteamGameServer_SetGameTags 'hidden'
1609522625020 znet: Java_zombie_core_znet_SteamGameServer_SetKeyValue key='description' value=''
1609522625021 znet: Java_zombie_core_znet_SteamGameServer_SetKeyValue key='version' value='40.43'
1609522625021 znet: Java_zombie_core_znet_SteamGameServer_SetKeyValue key='open' value='1'
1609522625021 znet: Java_zombie_core_znet_SteamGameServer_SetKeyValue key='public' value='0'
1609522625023 znet: Java_zombie_core_znet_SteamWorkshop_n_1Init
1609522625023 znet: Java_zombie_core_znet_SteamGameServer_LogOnAnonymous
1609522625023 znet: Java_zombie_core_znet_SteamGameServer_EnableHeartBeats
1609522625023 Waiting for response from Steam servers
1609522625125 znet: OnSteamServersConnectFailure
1609522625126 Failed to connect to Steam servers
1609522625126 znet: Java_zombie_core_znet_SteamUtils_n_1Shutdown

No world is ever created.

If I run the container directly (not using docker-compose) it appears to work without issue; a world is created on disk.

To Reproduce Steps to reproduce the behavior:

  1. Run docker-compose -f docker-compose.yml up
  2. See error

Expected behavior Server starts, world is created.

Actual behavior Server doesn't start, docker container remains running, world is not created.

Screenshots N/A

Additional context Here is my docker-compose.yml file (mostly copy/pasted from another issue on this github to address the invalid IP bug, which still seems to be an issue on 0.2.1/latest):

version: "3.0"

services:
    project-zomboid:
      image: cyrale/project-zomboid:latest
      restart: unless-stopped
      environment:
        SERVER_NAME: "RollhaxPZ"
        ADMIN_PASSWORD: "derp"
        LGSM_SERVER_CONFIG: |
          ip="10.3.8.200"
      ports:
        - "8766:8766/udp"
        - "8767:8767/udp"
        - "16261:16261/udp"
        - "16262-16272:16262-16272"
        - "27015:27015"
      volumes:
        - ./server-data:/server-data

I'm far from a docker whiz, but pretty sure it's telling me that the container is unable to communicate with steam. Might be wrong. Definitely odd that it works via docker compose though?

cyrale commented 3 years ago

Thank you for this complete description of your problem.

I have never had any problems communicating with Steam. I'll check it out quickly.

cyrale commented 3 years ago

I made some updates to make this image more usable. Could you test the new version by updating your configuration file with 0.2.2 tag or pulling the latest.

Documentation is also updated with 2 networks mode: bridge and host.

cyrale commented 3 years ago

I test your configuration without LGSM_SERVER_CONFIG environment and the server start without a problem. Maybe you have a network connection problem. Closed ports or something like this.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.