[0.16.51] Server with custom port sets different port than specified

Post your bugs and problems so we can fix them.
Post Reply
User avatar
DDDGamer
Inserter
Inserter
Posts: 30
Joined: Mon Oct 17, 2016 2:16 pm
Contact:

[0.16.51] Server with custom port sets different port than specified

Post by DDDGamer » Thu Oct 04, 2018 4:03 pm

Trying to set a custom port for factorio server (in order to run 2 separate servers, and also have default port reserved for my local steam client game)
But instead of my specified port, the game sets one up to be 1024, and 1025 for second server, i imagine 1026, etc.. if one has more

Also this does not happen always, sometimes it would get the 1024 address sometimes not

Log:

Code: Select all

0.000 2018-10-04 15:52:30; Factorio 0.16.51 (build 36654, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "34196" "--start-server-load-latest" "--server-settings" "/factorio/config/server-settings.json" "--server-whitelist" "/factorio/config/server-whitelist.json" "--server-banlist" "/factorio/config/server-banlist.json" "--rcon-port" "27015" "--rcon-password" <private> "--server-id" "/factorio/config/server-id.json"
0.000 Read data path: /opt/factorio/data
0.000 Write data path: /opt/factorio [15367/20480MB]
0.000 Binaries path: /opt/factorio/bin
0.005 System info: [CPU: Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz, 8 cores, RAM: 16072 MB]

0.005 Environment: DISPLAY=<unset>, WAYLAND_DISPLAY=<unset>
0.005 Running in headless mode
0.007 Loading mod core 0.0.0 (data.lua)
0.015 Loading mod base 0.16.51 (data.lua)
0.111 Loading mod base 0.16.51 (data-updates.lua)
0.148 Checksum for core: 840319042

0.148 Checksum of base: 3323233190

0.221 Info PlayerData.cpp:65: Local player-data.json available, timestamp 1538668294
0.221 Info PlayerData.cpp:72: Cloud player-data.json unavailable
0.222 Custom inputs active: 0
0.111 Loading mod base 0.16.51 (data-updates.lua)
0.148 Checksum for core: 840319042

0.148 Checksum of base: 3323233190

0.221 Info PlayerData.cpp:65: Local player-data.json available, timestamp 1538668294
0.221 Info PlayerData.cpp:72: Cloud player-data.json unavailable
0.222 Custom inputs active: 0
1.076 0 packages available to download (experimental updates disabled).
1.076 Factorio initialised
1.080 Info ServerSynchronizer.cpp:29: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
1.080 Info ServerMultiplayerManager.cpp:699: mapTick(4294967295) changing state from(Ready) to(PreparedToHostGame)
1.080 Info ServerMultiplayerManager.cpp:699: mapTick(4294967295) changing state from(PreparedToHostGame) to(CreatingGame)
1.081 Loading map /factorio/saves/_autosave1.zip: 11900141 bytes.
1.092 Loading Level.dat: 32536280 bytes.
1.096 Info Scenario.cpp:136: Map version 0.16.51-0

3.140 Loading script.dat: 880 bytes.
3.144 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 246304608

1.875 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:34196}))
1.876 Hosting game at IP ADDR:({0.0.0.0:34196})
1.876 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2
2.076 Info HttpSharedState.cpp:145: Status code: 200
2.076 Info AuthServerConnector.cpp:109: Obtained serverPadlock for serverHash (FPfEcMDVjcEIjgV302z5fZmfipZ4ZHlR) from the auth server.
2.076 Info ServerMultiplayerManager.cpp:699: mapTick(9462767) changing state from(CreatingGame) to(InGame)
2.076 Info ServerRouter.cpp:596: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
2.125 Info UDPSocket.cpp:39: Opening socket for broadcast
2.145 Error InterruptibleStdioStream.cpp:54: Reading stdin failed

2.145 Info RemoteCommandProcessor.cpp:128: Starting RCON interface at port 27015
2.264 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:1024})
2.507 Info MatchingServer.cpp:86: Matching server game `3324159` has been created.
2.517 Info ServerMultiplayerManager.cpp:628: Matching server connection resumed
As i understand
1.875 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:34196})) <- port 34196
1.876 Hosting game at IP ADDR:({0.0.0.0:34196}) <- port 34196
2.076 Info ServerRouter.cpp:596: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
2.264 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:1024}) <- port 1024, expected 34196 (replaced my ip with x.x.x.x)

Here is a successfull one:

Code: Select all

0.000 2018-10-04 16:07:19; Factorio 0.16.51 (build 36654, linux64, headless)
0.000 Operating system: Linux
0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "34198" "--start-server-load-latest" "--server-settings" "/factorio/config/server-settings.json" "--server-whitelist" "/factorio/config/server-whitelist.json" "--server-banlist" "/factorio/config/server-banlist.json" "--rcon-port" "27015" "--rcon-password" <private> "--server-id" "/factorio/config/server-id.json"
0.000 Read data path: /opt/factorio/data
0.000 Write data path: /opt/factorio [15367/20480MB]
0.000 Binaries path: /opt/factorio/bin
0.005 System info: [CPU: Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz, 8 cores, RAM: 16072 MB]

0.005 Environment: DISPLAY=<unset>, WAYLAND_DISPLAY=<unset>
0.005 Running in headless mode
0.007 Loading mod core 0.0.0 (data.lua)
0.016 Loading mod base 0.16.51 (data.lua)
0.121 Loading mod base 0.16.51 (data-updates.lua)
0.155 Checksum for core: 840319042

0.155 Checksum of base: 3323233190

0.231 Info PlayerData.cpp:65: Local player-data.json available, timestamp 1538668972
0.231 Info PlayerData.cpp:72: Cloud player-data.json unavailable
0.232 Custom inputs active: 0
1.372 0 packages available to download (experimental updates disabled).
1.372 Factorio initialised
1.379 Info ServerSynchronizer.cpp:29: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
1.379 Info ServerMultiplayerManager.cpp:699: mapTick(4294967295) changing state from(Ready) to(PreparedToHostGame)
1.379 Info ServerMultiplayerManager.cpp:699: mapTick(4294967295) changing state from(PreparedToHostGame) to(CreatingGame)
1.379 Loading map /factorio/saves/_autosave1.zip: 17795744 bytes.
1.387 Loading Level.dat: 49489730 bytes.
1.393 Info Scenario.cpp:136: Map version 0.16.51-0

2.480 Loading script.dat: 1508 bytes.
2.484 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 997060638

2.498 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:34198}))
2.498 Hosting game at IP ADDR:({0.0.0.0:34198})
2.498 Info HttpSharedState.cpp:54: Downloading https://auth.factorio.com/generate-server-padlock-2
2.670 Info HttpSharedState.cpp:145: Status code: 200
2.670 Info AuthServerConnector.cpp:109: Obtained serverPadlock for serverHash (Xx71rRr777Q0mAA4vgE44822QMaH76UP) from the auth server.
2.670 Info ServerMultiplayerManager.cpp:699: mapTick(21193782) changing state from(CreatingGame) to(InGame)
2.670 Info ServerRouter.cpp:596: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
2.718 Info UDPSocket.cpp:39: Opening socket for broadcast
2.738 Error InterruptibleStdioStream.cpp:54: Reading stdin failed

2.739 Info RemoteCommandProcessor.cpp:128: Starting RCON interface at port 27015
2.859 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:34198})
3.095 Info MatchingServer.cpp:86: Matching server game `3324241` has been created.
3.112 Info ServerMultiplayerManager.cpp:628: Matching server connection resumed
2.498 Info UDPSocket.cpp:27: Opening socket at (IP ADDR:({0.0.0.0:34198})) <- port 34198
2.498 Hosting game at IP ADDR:({0.0.0.0:34198}) <- port 34198
2.670 Info ServerRouter.cpp:596: Asking pingpong servers (pingpong1.factorio.com:34197, pingpong2.factorio.com:34197) for own address
2.859 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:34198}) <- as expected port 34198

cjmwid
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Thu Mar 23, 2017 3:32 am
Contact:

Re: [0.16.51] Server with custom port sets different port than specified

Post by cjmwid » Fri Oct 05, 2018 3:22 am

I too have had this issue with running Linux headless, try another port? That's what i did and it fixed itself for me
Image

Zavian
Smart Inserter
Smart Inserter
Posts: 1385
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [0.16.51] Server with custom port sets different port than specified

Post by Zavian » Fri Oct 05, 2018 8:08 am

Any chance you are behind a router doing NAT? Because if you are then it sounds like you should setup some static port forwarding rules.

User avatar
DDDGamer
Inserter
Inserter
Posts: 30
Joined: Mon Oct 17, 2016 2:16 pm
Contact:

Re: [0.16.51] Server with custom port sets different port than specified

Post by DDDGamer » Fri Oct 05, 2018 10:38 am

Port forwarding has been already set up
Attachments
firefox_2018-10-05_06-36-22.png
firefox_2018-10-05_06-36-22.png (18.83 KiB) Viewed 563 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 9052
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.51] Server with custom port sets different port than specified

Post by Rseding91 » Fri Oct 05, 2018 9:32 pm

Have you tested that it's actually using that port? Because if I understand it correctly: all that's saying is "when you asked the server 'what is my IP'" the server said it was 'X...' and the port during that request doesn't matter.
If you want to get ahold of me I'm almost always on Discord.

User avatar
DDDGamer
Inserter
Inserter
Posts: 30
Joined: Mon Oct 17, 2016 2:16 pm
Contact:

Re: [0.16.51] Server with custom port sets different port than specified

Post by DDDGamer » Sat Oct 06, 2018 10:44 am

Not sure what you mean by testing that is actually using the port.
If its

Code: Select all

2.264 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:1024})
then the game doesnt show up in the lobby, and i cant connect with the direct server option (ill have to retest and see if i can connect on port 1024 instead when/if it happens again)
and if its

Code: Select all

2.859 Info ServerRouter.cpp:491: Own address is IP ADDR:({x.x.x.x:34198}) <- as expected port 34198
then the game shows up and i can connect

So are you suggesting that the port is system specific and have nothing to do with factorio server's matching connections? (I do not know how that works)

Post Reply

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users