Connection Issues With Linux Headless Server
Posted: Sat Feb 04, 2017 8:12 pm
I setup a headless server on an external linux server and I run it with the factorio-init script. Occasionally, the server crashes due to not enough processing power, and then after restarting my friend would have connection issues. He gets an error saying "Couldn't establish network communication with the server". What is strange is I am able to connect to the server, but he cannot. The last time this happened, we solved the problem by having him unplug the router overnight then plugging it back in, essentially dishing him a new ip address. He also has trouble accessing several, or occasionally all the servers listed on the server browser when this happens. What is strange is when he attempts to connect to my server, it does not even show up in the logs.
Here is the contents of factorio-current.log
I replace my ip address with kikiotsuka_ip_address. I connect, then disconnect, then reconnect, and then tell my friend to connect afterwards but there is nothing in the logs afterwards.
Here is his error log. Here I replace my server ip address with kikiotsuka_server_ip. His machine is Windows 7 factorio latest version (0.14.22) on steam
Here is the contents of factorio-current.log
I replace my ip address with kikiotsuka_ip_address. I connect, then disconnect, then reconnect, and then tell my friend to connect afterwards but there is nothing in the logs afterwards.
Code: Select all
droplet:/opt/factorio# cat factorio-current.log
0.001 2017-02-04 19:51:18; Factorio 0.14.22 (build 25342, linux64, headless)
0.067 Operating system: Linux (Ubuntu 16.04)
0.067 Program arguments: "/opt/factorio/bin/x64/factorio" "--config" "/opt/factorio/config/config.ini" "--port" "34197" "--start-server-load-latest" "--server-settings" "/opt/factorio/data/server-settings.json"
0.067 Read data path: /opt/factorio/data
0.067 Write data path: /opt/factorio
0.067 Binaries path: /opt/factorio/bin
0.078 System info: [CPU: Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz, 1 core, RAM: 488MB]
0.079 Running in headless mode
0.081 Loading mod core 0.0.0 (data.lua)
0.085 Loading mod base 0.14.22 (data.lua)
0.229 Checksum for core: 1291735968
0.229 Checksum for mod base: 786624017
0.804 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1486235134
0.804 Info PlayerData.cpp:62: Cloud player-data.json unavailable
0.806 Custom inputs active: 0
0.807 Factorio initialised
0.808 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
0.808 Info ServerMultiplayerManager.cpp:658: mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.808 Info ServerMultiplayerManager.cpp:658: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.813 Loading map /opt/factorio/saves/_autosave5.zip
0.881 Info Scenario.cpp:152: Map version 0.14.22-0
4.693 Checksum for script /opt/factorio/temp/currently-playing/control.lua: 1057114497
4.809 Info UDPSocket.cpp:27: Opening socket at (0.0.0.0:34197)
4.810 Hosting game at 0.0.0.0:34197
4.810 Info ServerMultiplayerManager.cpp:658: mapTick(4644001) changing state from(CreatingGame) to(InGame)
4.810 Info UDPSocket.cpp:39: Opening socket for broadcast
7.040 ConnectionRequestReplyConfirm (type(ConnectionRequestReplyConfirm) ) from(kikiotsuka_ip_address:59954)
7.040 Info ServerRouter.cpp:413: Replying to connectionRequest for address(kikiotsuka_ip_address:59954).
7.040 Info ServerSynchronizer.cpp:524: nextHeartbeatSequenceNumber(65) adding peer(1)
7.057 Info ServerMultiplayerManager.cpp:658: mapTick(4644001) changing state from(InGame) to(InGameSavingMap)
7.193 Info ServerMultiplayerManager.cpp:742: mapTick(4644001) received stateChanged peerID(1) oldState(Ready) newState(ConnectedWaitingForMap)
8.740 Info ServerMultiplayerManager.cpp:779: MapTick(4644001) Serving map(/opt/factorio/temp/mp-save-0.zip) for peer(1) size(10765657) crc(910418473)
8.740 Info ServerMultiplayerManager.cpp:658: mapTick(4644001) changing state from(InGameSavingMap) to(InGame)
8.929 Info ServerMultiplayerManager.cpp:742: mapTick(4644014) received stateChanged peerID(1) oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap)
13.743 Info ServerMultiplayerManager.cpp:742: mapTick(4644302) received stateChanged peerID(1) oldState(ConnectedDownloadingMap) newState(ConnectedLoadingMap)
14.939 Info ServerMultiplayerManager.cpp:742: mapTick(4644374) received stateChanged peerID(1) oldState(ConnectedLoadingMap) newState(TryingToCatchUp)
16.074 Info ServerMultiplayerManager.cpp:742: mapTick(4644442) received stateChanged peerID(1) oldState(TryingToCatchUp) newState(WaitingForCommandToStartSendingTickClosures)
16.074 Info GameActionHandler.cpp:2556: MapTick(4644442) processed PlayerJoinGame peerID(1) playerIndex(0) mode(connect)
16.252 Info ServerMultiplayerManager.cpp:742: mapTick(4644453) received stateChanged peerID(1) oldState(WaitingForCommandToStartSendingTickClosures) newState(InGame)
919.799 Info ServerMultiplayerManager.cpp:822: Disconnect notification for peer (1)
919.800 Info ServerMultiplayerManager.cpp:742: mapTick(4698510) received stateChanged peerID(1) oldState(InGame) newState(DisconnectScheduled)
919.801 Info ServerSynchronizer.cpp:539: nextHeartbeatSequenceNumber(24310) removing peer(1).
923.132 ConnectionRequestReplyConfirm (type(ConnectionRequestReplyConfirm) ) from(kikiotsuka_ip_address:50334)
923.132 Info ServerRouter.cpp:413: Replying to connectionRequest for address(kikiotsuka_ip_address:50334).
923.133 Info ServerSynchronizer.cpp:524: nextHeartbeatSequenceNumber(24408) adding peer(2)
923.155 Info ServerMultiplayerManager.cpp:658: mapTick(4698511) changing state from(InGame) to(InGameSavingMap)
923.309 Info ServerMultiplayerManager.cpp:742: mapTick(4698511) received stateChanged peerID(2) oldState(Ready) newState(ConnectedWaitingForMap)
925.532 Info ServerMultiplayerManager.cpp:779: MapTick(4698511) Serving map(/opt/factorio/temp/mp-save-1.zip) for peer(2) size(10323734) crc(2202115684)
925.533 Info ServerMultiplayerManager.cpp:658: mapTick(4698511) changing state from(InGameSavingMap) to(InGame)
925.731 Info ServerMultiplayerManager.cpp:742: mapTick(4698527) received stateChanged peerID(2) oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap)
930.418 Info ServerMultiplayerManager.cpp:742: mapTick(4698809) received stateChanged peerID(2) oldState(ConnectedDownloadingMap) newState(ConnectedLoadingMap)
931.555 Info ServerMultiplayerManager.cpp:742: mapTick(4698877) received stateChanged peerID(2) oldState(ConnectedLoadingMap) newState(TryingToCatchUp)
932.562 Info ServerMultiplayerManager.cpp:742: mapTick(4698937) received stateChanged peerID(2) oldState(TryingToCatchUp) newState(WaitingForCommandToStartSendingTickClosures)
932.564 Info GameActionHandler.cpp:2556: MapTick(4698937) processed PlayerJoinGame peerID(2) playerIndex(0) mode(connect)
932.748 Info ServerMultiplayerManager.cpp:742: mapTick(4698948) received stateChanged peerID(2) oldState(WaitingForCommandToStartSendingTickClosures) newState(InGame)
Code: Select all
1544.922 Joining game kikiotsuka_server_ip:34197
1544.922 Info UDPSocket.cpp:33: Opening socket
1544.922 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Ready) to(Connecting)
1547.454 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply
1547.454 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Connecting) to(InitializationFailed)
1557.721 Info ClientMultiplayerManager.cpp:177: Quitting multiplayer connection.
1557.721 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(InitializationFailed) to(Disconnected)
1557.722 Info UDPSocket.cpp:235: Socket closed