[solved] Incorrect port detected for docker hosted server

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
onebit
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Mon Feb 02, 2015 4:32 pm
Contact:

[solved] Incorrect port detected for docker hosted server

Post by onebit »

I can connect to factorio1.aws.easypages.us, but from the server browser I receive "Couldn't establish network connection with server ".

The server runs on port 34197, not 1024.

This server runs inside a Factorio Docker container. Version 0.14.16.

Code: Select all

Hosting game at 0.0.0.0:34197 # server knows it's port is 34197
Own address is 45.32.95.58:1024 # server list disagrees
Joining game 45.32.95.58:1024 # client becomes belligerent
Server Log

Code: Select all

 0.000 2016-10-26 14:18:08; Factorio 0.14.16 (build 25219, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server-load-latest" "--server-settings" "/opt/factorio/data/server-settings.json"
   0.000 Read data path: /opt/factorio/data
   0.000 Write data path: /opt/factorio
   0.000 Binaries path: /opt/factorio/bin
   0.014 System info: [CPU: Virtual CPU 714389bda930, 1 core, RAM: 997MB]
   0.014 Running in headless mode
   0.019 Loading mod core 0.0.0 (data.lua)
   0.025 Loading mod base 0.14.16 (data.lua)
   0.148 Loading mod TheFatController 1.0.0 (data.lua)
   0.245 Loading mod YARM 0.7.107 (data.lua)
   0.343 Checksum for core: 1291735968
   0.343 Checksum for mod base: 538937375
   0.343 Checksum for mod TheFatController: 3783390293
   0.343 Checksum for mod YARM: 3348033433
   0.899 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1477491487
   0.900 Info PlayerData.cpp:62: Cloud player-data.json unavailable
   0.903 Custom inputs active: 0
   0.903 Info Updater.cpp:749: Downloading https://updater.factorio.com/get-available-versions?username=user&token=<private>&apiVersion=2
   1.520 0 packages available to download (experimental updates disabled).
   1.527 Factorio initialised
   1.529 Info HttpSharedState.cpp:44: Downloading https://auth.factorio.com/api-login?api_version=2
   2.149 Info HttpSharedState.cpp:111: Status code: 200
   2.149 Info AuthServerConnector.cpp:165: Got token from auth server for username(user).
   2.150 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   2.150 Info ServerMultiplayerManager.cpp:658: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
   2.150 Info ServerMultiplayerManager.cpp:658: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
   2.152 Loading map /opt/factorio/saves/_autosave2.zip
   2.154 Error FileUtil.cpp:284: Can't remove /opt/factorio/temp/currently-playing: No such file or directory
   2.201 Info Scenario.cpp:152: Map version 0.14.16-0
   3.154 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 1057114497
   3.169 Checksum for script __TheFatController__/control.lua: 577423359
   3.179 Checksum for script __YARM__/control.lua: 2111372894
   3.188 Info UDPSocket.cpp:27: Opening socket at (0.0.0.0:34197)
   3.189 Hosting game at 0.0.0.0:34197
   3.189 Info HttpSharedState.cpp:44: Downloading https://auth.factorio.com/generate-server-padlock
   3.255 Info HttpSharedState.cpp:111: Status code: 200
   3.255 Info AuthServerConnector.cpp:106: Obtained serverPadlock for serverHash (q3UNKhi2usj5YzSuwtWhc7Jx6Q6ZNgPD) from the auth server.
   3.256 Info ServerMultiplayerManager.cpp:658: mapTick(274149) changing state from(CreatingGame) to(InGame)
   3.256 Info ServerRouter.cpp:604: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
   3.281 Info UDPSocket.cpp:39: Opening socket for broadcast
   3.305 Error InterruptibleStdioStream.cpp:53: Reading stdin failed
   3.473 Info ServerRouter.cpp:497: Own address is 45.32.95.58:1024
   3.776 Info ServerMultiplayerManager.cpp:587: Matching server connection resumed
Client Log

Code: Select all

  14.753 Info UDPSocket.cpp:27: Opening socket at (0.0.0.0:0)
  24.275 Info UDPSocket.cpp:235: Socket closed
  24.276 Joining game 45.32.95.58:1024
  24.276 Info UDPSocket.cpp:33: Opening socket
  24.276 Info ClientMultiplayerManager.cpp:538: MapTick(-1) changing state from(Ready) to(Connecting)
  25.579 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply
  25.579 Info ClientMultiplayerManager.cpp:538: MapTick(-1) changing state from(Connecting) to(InitializationFailed)
  26.948 Info ClientMultiplayerManager.cpp:177: Quitting multiplayer connection.
  26.948 Info ClientMultiplayerManager.cpp:538: MapTick(-1) changing state from(InitializationFailed) to(Disconnected)
  26.982 Info UDPSocket.cpp:235: Socket closed
Last edited by onebit on Wed Oct 26, 2016 9:19 pm, edited 3 times in total.

onebit
Long Handed Inserter
Long Handed Inserter
Posts: 97
Joined: Mon Feb 02, 2015 4:32 pm
Contact:

Re: Invalid "own address"?

Post by onebit »

Fixed! I successfully connected to the server from the server list.

I will pass on the solution in case it helps someone.

The solution was to set --userland-proxy=false when docker starts. This makes Docker use iptables rules instead of relaying through a proxy. It's recommended setting, even though it defaults to true.

I suspect the proxy screwed with the source port on the UDP packets, which i suspect is how the server port is detected.

Code: Select all

1.382 Info ServerRouter.cpp:497: Own address is 104.207.155.7:34197

Post Reply

Return to “Technical Help”