[0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

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
Ptitlaby
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 29, 2019 7:39 pm
Contact:

[0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by Ptitlaby »

Hello folks,

I'm trying to set up a remote server for factorio 0.17.74. I installed the headless server on a dedicated server, and I am using the Steam client. As you can guess, it doesn't connect

I launch the server with this command line :

Code: Select all

bin/x64/factorio --start-server saves/test.zip --bind 1.2.3.4:3344
The server starts without issue from what I can see, the last messages being :

Code: Select all

   1.056 Loading map /opt/factorio/saves/test.zip: 812235 bytes.
   1.078 Loading level.dat: 1526230 bytes.
   1.083 Info Scenario.cpp:187: Map version 0.17.74-0
   1.133 Verbose Scenario.cpp:229: Loading level.dat finished: 0.050221 seconds.
   1.136 Verbose BlueprintLibrary.cpp:65: Loaded external blueprint storage: playerIndex = 65535, nextRecordID = 0; timestamp = 0; records:
   1.136 Verbose Scenario.cpp:306: Entities setup finished: 0.002005 seconds.
   1.136 Loading script.dat: 328 bytes.
   1.140 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 3265260072
   1.142 Verbose Scenario.cpp:350: Map setup finished: 0.085391 seconds.
   1.142 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({188.165.204.213:3344}))
   1.142 Verbose RouterBase.cpp:60: Started router thread.
   1.142 Hosting game at IP ADDR:({1.2.3.4:3344})
   1.168 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2
   1.572 Info AuthServerConnector.cpp:109: Obtained serverPadlock for serverHash (pWFB87oijPxfSNKbbWPFwP7VNxKtcoG4) from the auth server.
   1.572 Info ServerMultiplayerManager.cpp:776: updateTick(0) changing state from(CreatingGame) to(InGame)
The log file on my computer shows that :

Code: Select all

908.103 Joining game IP ADDR:({1.2.3.4:3344})

908.103 Info UDPSocket.cpp:33: Opening socket

908.104 Info ClientMultiplayerManager.cpp:592: UpdateTick(4294967295) changing state from(Ready) to(Connecting)

918.110 Error ClientMultiplayerManager.cpp:101: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply

918.110 Info ClientMultiplayerManager.cpp:592: UpdateTick(4294967295) changing state from(Connecting) to(InitializationFailed)

 920.478 Info ClientMultiplayerManager.cpp:207: Quitting multiplayer connection.

920.478 Info ClientMultiplayerManager.cpp:592: UpdateTick(4294967295) changing state from(InitializationFailed) to(Disconnected)

920.479 Info UDPSocket.cpp:218: Closing socket

920.480 Info UDPSocket.cpp:248: Socket closed
On the server, the following iptable rule is in place :

Code: Select all

ACCEPT     udp  --  anywhere             server-name            udp dpt:domain
Factorio is correctly listening on the port, here is the output of netstat -ltup

Code: Select all

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

udp        0      0 server-name:3344          *:*                                 25593/factorio
And finally, I am receiving data from my client to the server

Code: Select all

root@server:/# tcpdump port 3344

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode

listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes

20:00:53.505021 IP client_ipv6 > server.3344: UDP, length 12

20:00:54.009017 IP client_ipv6  > server.3344: UDP, length 12

20:00:54.510022 IP client_ipv6  > server.3344: UDP, length 12
Any tip on how to move forward and continue debug this ?


Thanks !

Ptitlaby
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 29, 2019 7:39 pm
Contact:

Re: [0.17.74 - 0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by Ptitlaby »

I also tried to add a server config file, and make the game public. It appears in the lobby, and there is some traffic there when launching the server:

Server logs

Code: Select all

   1.127 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 3265260072
   1.129 Verbose Scenario.cpp:350: Map setup finished: 0.085347 seconds.
   1.129 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({1.2.3.4:3344}))
   1.129 Verbose RouterBase.cpp:60: Started router thread.
   1.129 Hosting game at IP ADDR:({1.2.3.4:3344})
   1.155 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2
   1.550 Info AuthServerConnector.cpp:109: Obtained serverPadlock for serverHash (Hy3xTsBdh7hVdTviMX4TkN0imRsiz7oC) from the auth server.
   1.550 Info ServerMultiplayerManager.cpp:776: updateTick(0) changing state from(CreatingGame) to(InGame)
   1.600 Info ServerRouter.cpp:618: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197, pingpong3.factorio.com:34197, pingpong4.factorio.com:34197) for own address
   1.601 Info UDPSocket.cpp:39: Opening socket for broadcast
   1.601 Info Main.cpp:921: Maximum segment size = 100; minimum segment size = 25; maximum-segment-size peer count = 10; minimum-segment-size peer count = 20
   1.686 Info ServerRouter.cpp:497: Own address is IP ADDR:({1.2.3.4:3344}) (confirmed by pingpong1)
   1.686 Verbose MatchingServer.cpp:99: Sending create request for game(4294967295) to matching server
   1.704 Info ServerRouter.cpp:497: Own address is IP ADDR:({1.2.3.4:3344}) (confirmed by pingpong3)
   1.717 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/create-game
   1.855 Info ServerRouter.cpp:497: Own address is IP ADDR:({1.2.3.4:3344}) (confirmed by pingpong4)
   2.172 Info MatchingServer.cpp:114: Matching server game `6253676` has been created.
   2.174 Info ServerMultiplayerManager.cpp:705: Matching server connection resumed
  16.705 Verbose ServerRouter.cpp:158: Sending keepalive nat punch request to pingpong server.
  31.718 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/post-game-heartbeat/6253676
  31.733 Verbose ServerRouter.cpp:158: Sending keepalive nat punch request to pingpong server.
  46.745 Verbose ServerRouter.cpp:158: Sending keepalive nat punch request to pingpong server.
  61.718 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/post-game-heartbeat/6253676
  61.760 Verbose ServerRouter.cpp:158: Sending keepalive nat punch request to pingpong server.
  76.770 Verbose ServerRouter.cpp:158: Sending keepalive nat punch request to pingpong server.
  91.718 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/post-game-heartbeat/6253676

Tcp dump traffic :

Code: Select all

20:51:48.783069 IP server.3344 > li1272-216.members.linode.com.34197: UDP, length 3
20:51:48.783325 IP server.3344 > li1817-28.members.linode.com.34197: UDP, length 3
20:51:48.783337 IP server.3344 > li1301-131.members.linode.com.34197: UDP, length 3
20:51:48.783348 IP server.3344 > li1567-206.members.linode.com.34197: UDP, length 3
20:51:48.792804 IP li1817-28.members.linode.com.34197 > server.3344: UDP, length 27
20:51:48.856783 IP li1272-216.members.linode.com.34197 > server.3344: UDP, length 27
20:51:48.880664 IP li1301-131.members.linode.com.34197 > server.3344: UDP, length 27
20:51:49.027131 IP li1567-206.members.linode.com.34197 > server.3344: UDP, length 27
20:52:03.887693 IP server.3344 > li1817-28.members.linode.com.34197: UDP, length 1
20:52:18.916291 IP server.3344 > li1817-28.members.linode.com.34197: UDP, length 1
20:52:33.928180 IP server.3344 > li1272-216.members.linode.com.34197: UDP, length 1
20:52:48.942475 IP server.3344 > li1817-28.members.linode.com.34197: UDP, length 1
20:52:52.261728 IP client_ipv659674 > server.3344: UDP, length 3
20:52:53.757734 IP client_ipv651411 > server.3344: UDP, length 12
20:52:54.268405 IP client_ipv651411 > server.3344: UDP, length 12
20:52:54.768713 IP client_ipv651411 > server.3344: UDP, length 12
20:52:55.269716 IP client_ipv651411 > server.3344: UDP, length 12
20:52:55.769738 IP client_ipv651411 > server.3344: UDP, length 12
Client logs

Code: Select all

  10.145 Custom mipmaps uploaded.
  10.206 Factorio initialised
  28.144 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:0}))
  33.082 Info UDPSocket.cpp:218: Closing socket
  33.082 Info UDPSocket.cpp:248: Socket closed
  33.082 Info UDPSocket.cpp:218: Closing socket
  33.083 Joining game IP ADDR:({1.2.3.4:3344})
  33.083 Info UDPSocket.cpp:33: Opening socket
  33.083 Info ClientMultiplayerManager.cpp:592: UpdateTick(4294967295) changing state from(Ready) to(Connecting)
  43.095 Error ClientMultiplayerManager.cpp:101: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply
  43.096 Info ClientMultiplayerManager.cpp:592: UpdateTick(4294967295) changing state from(Connecting) to(InitializationFailed)
  45.232 Info ClientMultiplayerManager.cpp:207: Quitting multiplayer connection.
  45.232 Info ClientMultiplayerManager.cpp:592: UpdateTick(4294967295) changing state from(InitializationFailed) to(Disconnected)
  45.234 Info UDPSocket.cpp:218: Closing socket
  45.234 Info UDPSocket.cpp:248: Socket closed
  46.256 Quitting: user-quit.
  46.315 DSound: Stopping voice
  46.315 DSound: Joining thread
  46.315 DSound: Exit _dsound_update; tid=15048
  46.316 DSound: Waiting for voice to stop ... signaled
  46.316 DSound: Joined thread
  46.316 DSound: Destroying thread
  46.316 DSound: Thread destroyed
  46.316 DSound: Releasing buffer
  46.316 DSound: Voice stopped
  46.316 DSound: Deallocating voice
  46.316 DSound: Deallocated voice
  46.378 Steam API shutdown.
  46.382 Goodbye

PunPun
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Mar 27, 2016 7:08 pm
Contact:

Re: [0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by PunPun »

Ptitlaby wrote:
Tue Oct 29, 2019 7:42 pm
Hello folks,

I'm trying to set up a remote server for factorio 0.17.74. I installed the headless server on a dedicated server, and I am using the Steam client. As you can guess, it doesn't connect

I launch the server with this command line :

Code: Select all

bin/x64/factorio --start-server saves/test.zip --bind 1.2.3.4:3344
By having that --bind 1.2.3.4:3344 you are telling the server to only accept connections coming to that address and port. If your servers ip is not 1.2.3.4 then your server is going to be unreachable. The --bind is only neccessary when you have a nonstandard network configuration so you propably should not use it.

Try launching the server with just

Code: Select all

bin/x64/factorio --start-server saves/test.zip

Ptitlaby
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 29, 2019 7:39 pm
Contact:

Re: [0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by Ptitlaby »

PunPun wrote:
Wed Oct 30, 2019 8:49 am
Ptitlaby wrote:
Tue Oct 29, 2019 7:42 pm
Hello folks,

I'm trying to set up a remote server for factorio 0.17.74. I installed the headless server on a dedicated server, and I am using the Steam client. As you can guess, it doesn't connect

I launch the server with this command line :

Code: Select all

bin/x64/factorio --start-server saves/test.zip --bind 1.2.3.4:3344
By having that --bind 1.2.3.4:3344 you are telling the server to only accept connections coming to that address and port. If your servers ip is not 1.2.3.4 then your server is going to be unreachable. The --bind is only neccessary when you have a nonstandard network configuration so you propably should not use it.

Try launching the server with just

Code: Select all

bin/x64/factorio --start-server saves/test.zip
Hello,

Thank you for your answer. I replaced the real server ip by 1.2.3.4 for privacy issue, I'm putting in paramter the real IP. In any case, I tried without the bind, and I still have the same issue with the same symptoms

PunPun
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Mar 27, 2016 7:08 pm
Contact:

Re: [0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by PunPun »

Since the packets are reaching the machine but are not reaching factorio's server my quess is that there is a firewall present on the machine that prevents it. Do you happen to know what OS the server is using? Most linux distros use iptables for firewall. You can check by running

Code: Select all

iptables -L
It should give you a list of all firewall rules.

Ptitlaby
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Oct 29, 2019 7:39 pm
Contact:

Re: [0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by Ptitlaby »

PunPun wrote:
Wed Oct 30, 2019 11:49 am
Since the packets are reaching the machine but are not reaching factorio's server my quess is that there is a firewall present on the machine that prevents it. Do you happen to know what OS the server is using? Most linux distros use iptables for firewall. You can check by running

Code: Select all

iptables -L
It should give you a list of all firewall rules.
Thank you very much, this is what was missing !

My distribution is the following :

Code: Select all

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.11 (jessie)
Release:        7
Codename:       jessie
And I didn't have any rule to allow the port 3344 to be open for iptables. I fixed it with the following rule :

Code: Select all

-A INPUT -p udp -d 1.2.3.4 --dport 3344 -j ACCEPT
I can now connect to my server :D

PunPun
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Mar 27, 2016 7:08 pm
Contact:

Re: [0.17.74] Can't connect to remove server, traffic seems to be going through but nothing happens

Post by PunPun »

Ptitlaby wrote:
Wed Oct 30, 2019 1:05 pm
I can now connect to my server :D
Yey. Have fun playing.

Post Reply

Return to “Technical Help”