Page 1 of 1

Unable to connect to factoriotools Docker server instance

Posted: Mon Dec 20, 2021 12:56 pm
by Naf
Hi, I'm new here as I'm having trouble getting a Docker server going.
In short, it seems to get running, but my game can't connect.

I started with the default yml file, but that only got me:
ERROR: Named volume "opt/factorio:/factorio:rw" is used in service "factorio" but no declaration was found in the volumes section.
I'm more familiar with version 3, so I moved everything across to that:
version: "3"


image: factoriotools/factorio:stable
container_name: Factorio_default
PUID: 1000
PGID: 1000
PORT: 40050
- /home/naf/Factorio_default/opt:/factorio
- 40050:34197
- 40051:27015
stop_grace_period: 30s
restart: unless-stopped
And now the container starts up fine, and the logs don't look like there's any issue:
0.000 2021-12-20 12:41:05; Factorio 1.1.49 (build 59227, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "40050" "--server-settings" "/factorio/config/server-settings.json" "--server-banlist" "/factorio/config/server-banlist.json" "--rcon-port" "27015" "--server-whitelist" "/factorio/config/server-whitelist.json" "--use-server-whitelist" "--server-adminlist" "/factorio/config/server-adminlist.json" "--rcon-password" <private> "--server-id" "/factorio/config/server-id.json" "--start-server-load-latest"
0.000 Read data path: /opt/factorio/data
0.000 Write data path: /factorio [93325/111657MB]
0.000 Binaries path: /opt/factorio/bin
0.005 System info: [CPU: Intel(R) Xeon(R) CPU E3-1220 v3 @ 3.10GHz, 4 cores, RAM: 15795 MB]
0.005 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
0.005 Running in headless mode
0.008 Loading mod core 0.0.0 (data.lua)
0.046 Loading mod base 1.1.49 (data.lua)
0.272 Loading mod base 1.1.49 (data-updates.lua)
0.360 Checksum for core: 1625176034
0.361 Checksum of base: 3210524035
0.546 Prototype list checksum: 3034860339
0.590 Info PlayerData.cpp:71: Local player-data.json available, timestamp 1640003298
0.590 Info PlayerData.cpp:78: Cloud player-data.json unavailable
0.592 Factorio initialised
0.592 Info ServerSynchronizer.cpp:29: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
0.592 Info ServerMultiplayerManager.cpp:797: updateTick(4294967295) changing state from(Ready) to(PreparedToHostGame)
0.592 Info ServerMultiplayerManager.cpp:797: updateTick(4294967295) changing state from(PreparedToHostGame) to(CreatingGame)
0.593 Loading map /factorio/saves/ 721337 bytes.
0.603 Loading level.dat: 1174313 bytes.
0.609 Info Scenario.cpp:198: Map version 1.1.49-1
0.629 Loading script.dat: 1171 bytes.
0.631 Checksum for script /factorio/temp/currently-playing/control.lua: 3795083680
0.632 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({}))
0.633 Hosting game at IP ADDR:({})
0.633 Info HttpSharedState.cpp:54: Downloading ... _version=4
0.935 Info AuthServerConnector.cpp:68: Obtained serverPadlock for serverHash (KVpRSszuth0syFU8q321kLE3ReQWDMqb) from the auth server.
0.935 Info ServerMultiplayerManager.cpp:797: updateTick(0) changing state from(CreatingGame) to(InGame)
0.935 Info UDPSocket.cpp:39: Opening socket for broadcast
0.935 Error InterruptibleStdioStream.cpp:61: Got EOF on stdin; closing
0.935 Info RemoteCommandProcessor.cpp:130: Starting RCON interface at IP ADDR:({})
0.935 Info CommandLineMultiplayer.cpp:284: Maximum segment size = 100; minimum segment size = 25; maximum-segment-size peer count = 10; minimum-segment-size peer count = 20
Except for that "0.935 ... EOF", maybe? But when I put the address:port into factorio, it comes back unable to connect.

Hopefully someone has some ideas where to look to get things going?

Re: Unable to connect to factoriotools Docker server instance

Posted: Wed Dec 29, 2021 12:23 pm
by Naf
Anyone got any ideas?

Re: Unable to connect to factoriotools Docker server instance

Posted: Wed Jan 05, 2022 5:52 pm
by Naf
For anyone coming across this in the future, you *must* add /udp to your port declaration. Despite what I found somewhere, docker compose does not default to both tcp and udp.