Connection Issues With Linux Headless 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
kikiotsuka
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Feb 27, 2016 8:52 am
Contact:

Connection Issues With Linux Headless Server

Post by kikiotsuka »

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.

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)
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

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

Loewchen
Global Moderator
Global Moderator
Posts: 8337
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Connection Issues With Linux Headless Server

Post by Loewchen »

Crash because of not enough processing power makes no sense.
How much RAM does the server have, the log shows 488MB?!
Post the complete log of the client.

kikiotsuka
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Feb 27, 2016 8:52 am
Contact:

Re: Connection Issues With Linux Headless Server

Post by kikiotsuka »

Server has 512 mb of ram.

My friend's log files. What happened here is he connected successfully. Disconnected to go use the bathroom, and then he suddenly can't reconnect. He also says that some online browser servers work, but the majority do not.

Code: Select all

   0.026 2017-02-04 21:03:12; Factorio 0.14.22 (build 25342, win64, steam)
   0.026 Operating system: Windows 7 Service Pack 1
   0.026 Program arguments: "C:\Program Files (x86)\Steam\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.026 Read data path: C:/Program Files (x86)/Steam/steamapps/common/Factorio/data
   0.026 Write data path: C:/Users/game/AppData/Roaming/Factorio
   0.026 Binaries path: C:/Program Files (x86)/Steam/steamapps/common/Factorio/bin
   0.088 System info: [CPU:         Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 8 cores, RAM: 12270MB]
   0.089 Display options: [FullScreen: 0] [VSync: 0] [UIScale: 100%] [MultiSampling: OFF] [Screen: 255]
   0.089 Available display adapters: 1
   0.089  [0]: \\.\DISPLAY1 - NVIDIA GeForce GTX 560  {0x05, [0,0], 2560x1440, 32bit, 59Hz}
   0.089 Create display on adapter 0. Size 1280x720 at position [630, 342].
   0.138 Initialised Direct3D:[0] NVIDIA GeForce GTX 560 ; driver: nvd3dumx.dll 10.18.13.5850
   0.141     Video memory size (dedicated video/dedicated system/shared system/available): 2000/0/2047/4045 MB
   0.166 DSound: Starting _dsound_update thread
   0.166 DSound: Enter _dsound_update; tid=4900
   0.167 Device reset internal.
   0.168 Desktop composition is active.
   0.169 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: false]
   0.246 Loading mod core 0.0.0 (data.lua)
   0.251 Loading mod base 0.14.22 (data.lua)
   0.352 Checksum for core: 1291735968
   0.352 Checksum for mod base: 786624017
   0.838 Info PlayerData.cpp:55: Local player-data.json available, timestamp 1486249819
   0.838 Info PlayerData.cpp:60: Cloud player-data.json available, timestamp 1486241387
   0.944 Initial atlas bitmap size is 16384
   0.947 Created atlas bitmap 16384x5589
   1.361 Created atlas bitmap 4096x968
   1.384 Created atlas bitmap 4096x3652
  49.086 Sprites loaded
  49.086 Convert atlas 4096x968 to: trilinear-filtering 
  49.117 Convert atlas 4096x3652 to: mipmap 
  49.656 Loading sounds...
  55.609 Custom inputs active: 0
  55.932 Factorio initialised
  55.962 Device reset internal.
  60.905 Joining game kikiotsuka_server_ip:34197
  60.905 Info UDPSocket.cpp:33: Opening socket
  61.021 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Ready) to(Connecting)
  61.102 Info ClientSynchronizer.cpp:34: Initialized Synchronizer local peer(1) latency(32).
  61.104 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Connecting) to(ConnectedWaitingForMap)
  61.104 Info ClientRouter.cpp:219: ConnectionAccepted
  63.350 Device reset internal.
  63.919 Info ClientMultiplayerManager.cpp:669: Received mapReadyForDownload
  63.919 Downloading file C:\Users\game\AppData\Roaming\Factorio\temp\mp-download.zip (10290270 B, 20499 blocks)
  63.922 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(ConnectedWaitingForMap) to(ConnectedDownloadingMap)
  73.737 Finished download (9 s, 10 MB, 1.0 MB/s)
  73.826 Info ClientMultiplayerManager.cpp:650: mapTick(-1) map download finished creating scenario
  73.827 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(ConnectedDownloadingMap) to(ConnectedLoadingMap)
  73.857 Loading map C:\Users\game\AppData\Roaming\Factorio\temp\mp-download.zip
  73.977 Info Scenario.cpp:152: Map version 0.14.22-0
  75.567 Checksum for script C:/Users/game/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 1057114497
  75.590 Info ClientMultiplayerManager.cpp:539: MapTick(5041949) changing state from(ConnectedLoadingMap) to(TryingToCatchUp)
  77.012 Info ClientMultiplayerManager.cpp:539: MapTick(5042747) changing state from(TryingToCatchUp) to(WaitingForCommandToStartSendingTickClosures)
  77.085 Info ClientMultiplayerManager.cpp:539: MapTick(5042747) changing state from(WaitingForCommandToStartSendingTickClosures) to(InGame)
  77.182 Info GameActionHandler.cpp:2556: MapTick(5042751) processed PlayerJoinGame peerID(4) playerIndex(3) mode(connect)
  77.324 Info ClientSynchronizer.cpp:255: Changing local latency from 32 to 61 (nextTickToSend: 5042784, ticksClientWillJumpOver: 0 {})
  91.218 Info ClientSynchronizer.cpp:255: Changing local latency from 61 to 20 (nextTickToSend: 5043648, ticksClientWillJumpOver: 0 {})
 101.202 Info ClientSynchronizer.cpp:255: Changing local latency from 20 to 15 (nextTickToSend: 5044211, ticksClientWillJumpOver: 0 {})
 111.202 Info ClientSynchronizer.cpp:255: Changing local latency from 15 to 8 (nextTickToSend: 5044812, ticksClientWillJumpOver: 0 {})
 131.235 Info ClientSynchronizer.cpp:255: Changing local latency from 8 to 13 (nextTickToSend: 5046007, ticksClientWillJumpOver: 0 {})
 141.201 Info ClientSynchronizer.cpp:255: Changing local latency from 13 to 8 (nextTickToSend: 5046610, ticksClientWillJumpOver: 0 {})
 206.218 Info ClientSynchronizer.cpp:255: Changing local latency from 8 to 37 (nextTickToSend: 5050506, ticksClientWillJumpOver: 0 {})
 216.219 Info ClientSynchronizer.cpp:255: Changing local latency from 37 to 8 (nextTickToSend: 5051135, ticksClientWillJumpOver: 0 {})
 266.235 Info ClientSynchronizer.cpp:255: Changing local latency from 8 to 9 (nextTickToSend: 5054107, ticksClientWillJumpOver: 0 {})
 276.185 Info ClientSynchronizer.cpp:255: Changing local latency from 9 to 8 (nextTickToSend: 5054705, ticksClientWillJumpOver: 0 {})
 401.219 Info ClientSynchronizer.cpp:255: Changing local latency from 8 to 10 (nextTickToSend: 5062206, ticksClientWillJumpOver: 0 {})
 411.185 Info ClientSynchronizer.cpp:255: Changing local latency from 10 to 8 (nextTickToSend: 5062806, ticksClientWillJumpOver: 0 {})
 461.218 Info ClientSynchronizer.cpp:255: Changing local latency from 8 to 10 (nextTickToSend: 5065806, ticksClientWillJumpOver: 0 {})
 476.202 Info ClientSynchronizer.cpp:255: Changing local latency from 10 to 9 (nextTickToSend: 5066707, ticksClientWillJumpOver: 0 {})
 571.218 Info ClientSynchronizer.cpp:255: Changing local latency from 9 to 8 (nextTickToSend: 5072408, ticksClientWillJumpOver: 0 {})
 581.202 Info ClientSynchronizer.cpp:255: Changing local latency from 8 to 10 (nextTickToSend: 5073005, ticksClientWillJumpOver: 0 {})
 596.202 Info ClientSynchronizer.cpp:255: Changing local latency from 10 to 9 (nextTickToSend: 5073907, ticksClientWillJumpOver: 0 {})
 611.201 Info ClientSynchronizer.cpp:255: Changing local latency from 9 to 8 (nextTickToSend: 5074807, ticksClientWillJumpOver: 0 {})
 640.877 Info ClientMultiplayerManager.cpp:129: Disconnecting multiplayer connection.
 640.877 Info ClientMultiplayerManager.cpp:539: MapTick(5076468) changing state from(InGame) to(DisconnectScheduled)
 640.902 Info ClientMultiplayerManager.cpp:539: MapTick(5076468) changing state from(DisconnectScheduled) to(WaitingForDisconnectConfirmation)
 640.969 Info ClientMultiplayerManager.cpp:539: MapTick(5076468) changing state from(WaitingForDisconnectConfirmation) to(Disconnected)
 640.969 Info ClientMultiplayerManager.cpp:773: Disconnect notification for peer (4)
 641.248 Info UDPSocket.cpp:235: Socket closed
 806.635 Joining game kikiotsuka_server_ip:34197
 806.635 Info UDPSocket.cpp:33: Opening socket
 806.636 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Ready) to(Connecting)
 809.152 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply
 809.152 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Connecting) to(InitializationFailed)
 810.153 Info ClientMultiplayerManager.cpp:177: Quitting multiplayer connection.
 810.153 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(InitializationFailed) to(Disconnected)
 810.236 Info UDPSocket.cpp:235: Socket closed
 811.285 Joining game kikiotsuka_server_ip:34197
 811.285 Info UDPSocket.cpp:33: Opening socket
 811.286 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Ready) to(Connecting)
 813.802 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: multiplayer.not-received-connection-accept-reply
 813.802 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(Connecting) to(InitializationFailed)
 818.369 Info ClientMultiplayerManager.cpp:177: Quitting multiplayer connection.
 818.369 Info ClientMultiplayerManager.cpp:539: MapTick(-1) changing state from(InitializationFailed) to(Disconnected)
 818.385 Info UDPSocket.cpp:235: Socket closed
 819.457 DSound: Stopping voice
 819.457 DSound: Joining thread
 819.462 DSound: Exit _dsound_update; tid=4900
 819.462 DSound: Waiting for voice to stop ... signaled
 819.462 DSound: Joined thread
 819.462 DSound: Destroying thread
 819.462 DSound: Thread destroyed
 819.462 DSound: Releasing buffer
 819.462 DSound: Voice stopped
 819.462 DSound: Deallocating voice
 819.462 DSound: Deallocated voice
 819.549 Steam API shutdown.
 819.551 Goodbye

Post Reply

Return to “Technical Help”