zopanix / docker_factorio_server

Factorio Server in Docker
MIT License
31 stars 275 forks source link

Couldn't establish network communication #9

Closed bkuhl closed 8 years ago

bkuhl commented 8 years ago

Thanks for putting together this image - on alpine of all distros! I use Rancher so I appreciate the ability to quickly spin up a game server. I understand you won't provide support for running a server, but I'm curious if you've seen this issue before.

I'm redirecting port 3000 to 34197 on the host but am unable to establish a connection. I'm having trouble determining the cause of the issue. It keeps saying connection is already in progress.

Have you seen this before?

//cc @alexknutson

https://www.reddit.com/r/factorio/comments/486my5/issues_with_factorio_servers/ was an interesting read, but you suggested changing the port if running locally so I'm guessing you've successfully redirected the port?

5/15/2016 11:12:24 PM 487.271 Connection request from 74.134.247.255:34197
5/15/2016 11:12:24 PM 487.272 Refusing connection for address(74.134.247.255:34197). Another connection from this peer is in progress.
5/15/2016 11:12:25 PM 488.005 Info Synchronizer.cpp:444: NetworkTick(29138) peer(1) drop detection state(100/600).
5/15/2016 11:12:26 PM 489.671 Info Synchronizer.cpp:444: NetworkTick(29138) peer(1) drop detection state(200/600).
5/15/2016 11:12:28 PM 491.338 Info Synchronizer.cpp:444: NetworkTick(29138) peer(1) drop detection state(300/600).
5/15/2016 11:12:30 PM 493.004 Info Synchronizer.cpp:444: NetworkTick(29138) peer(1) drop detection state(400/600).
5/15/2016 11:12:31 PM 494.671 Info Synchronizer.cpp:444: NetworkTick(29138) peer(1) drop detection state(500/600).
5/15/2016 11:12:33 PM 496.338 Info Synchronizer.cpp:444: NetworkTick(29138) peer(1) drop detection state(600/600).
5/15/2016 11:12:33 PM 496.354 Info Synchronizer.cpp:590: NetworkTick(29138) peer(1) peerHeartbeatsEmpty(true) is not responding, dropping.
5/15/2016 11:12:33 PM 496.454 Info MultiplayerManager.cpp:1433: Received peer info for peer(0) username(<server>).
5/15/2016 11:12:33 PM 496.454 Info MultiplayerManager.cpp:1060: networkTick(29143) mapTick(34) received stateChanged peerID(0) oldState(InGame) newState(InGame)
5/15/2016 11:12:33 PM 496.471 Info Router.cpp:741: Received onPeerConnected for already connected peer(1)
5/15/2016 11:12:33 PM 496.471 Info MultiplayerManager.cpp:1495: Peer dropout for peer (1) by peer (0) -- removing now
5/15/2016 11:12:33 PM 496.471 Info MultiplayerManager.cpp:1010: networkTick(29144) mapTick(35) removing peer(1) dropout(true)
5/15/2016 11:12:33 PM 496.471 Info Synchronizer.cpp:516: networkTick(29144) removing peer(1) success(false).
5/15/2016 11:12:33 PM 496.471 Info MultiplayerManager.cpp:913: networkTick(29144) mapTick(35) changing state from(InGame) to(InGameAligning)
5/15/2016 11:12:33 PM 496.471 Info MultiplayerManager.cpp:1719: networkTick(29144) mapTick(35) starting mapAlign
5/15/2016 11:12:33 PM 496.471 Info MultiplayerManager.cpp:1633: networkTick(29144) mapTick(35) adding mapAlignTask(RemovePlayerAlignTask)
5/15/2016 11:12:33 PM 496.571 Info MultiplayerManager.cpp:1060: networkTick(29150) mapTick(35) received stateChanged peerID(0) oldState(InGame) newState(InGameAligning)
5/15/2016 11:12:33 PM 496.571 Info MultiplayerManager.cpp:1653: networkTick(29150) mapTick(35) sending mapAlignAction
5/15/2016 11:12:33 PM 496.671 Info MultiplayerManager.cpp:1307: networkTick(29156) mapTick(35) received MapAlignAction from peer(0), mapAlignTick(36) appliedTickClosuresCount(0)
5/15/2016 11:12:33 PM 496.671 Info MultiplayerManager.cpp:1735: networkTick(29157) mapTick(35) mapAlign finished targetTick(36) updating map and running the tasks ...
5/15/2016 11:12:33 PM 496.671 Info MultiplayerManager.cpp:1607: networkTick(29157) mapTick(35) peerID(0) fullStateLog: local state(InGameAligning) local peers(((peerID(0) state(InGameAligning) mapAlignTick(36))
5/15/2016 11:12:33 PM)
5/15/2016 11:12:33 PM 496.673 Info MultiplayerManager.cpp:1754: maptick(36) crc before applying all ticks: -486121007
5/15/2016 11:12:33 PM 496.673 Info NetworkInputHandler.cpp:661: applyAllTickClosures: expectedMapTick(36) lastTickApplied(27) referenceMapTick(36) networkTick(29157)
5/15/2016 11:12:33 PM 496.673 Info MultiplayerManager.cpp:1762: maptick(36) crc after applying all ticks: -486121007
5/15/2016 11:12:33 PM 496.673 Info MultiplayerManager.cpp:913: networkTick(29157) mapTick(36) changing state from(InGameAligning) to(InGameAligned)
5/15/2016 11:12:33 PM 496.788 Info MultiplayerManager.cpp:1060: networkTick(29163) mapTick(36) received stateChanged peerID(0) oldState(InGameAligning) newState(InGameAligned)
5/15/2016 11:12:33 PM 496.789 Info MultiplayerManager.cpp:913: networkTick(29163) mapTick(36) changing state from(InGameAligned) to(InGameWaitingForOthers)
5/15/2016 11:12:34 PM 496.888 Info MultiplayerManager.cpp:1060: networkTick(29169) mapTick(36) received stateChanged peerID(0) oldState(InGameAligned) newState(InGameWaitingForOthers)
5/15/2016 11:12:34 PM 496.888 Info MultiplayerManager.cpp:1259: networkTick(29169) mapTick(36) stopping mapAlign
5/15/2016 11:12:34 PM 496.888 Info MultiplayerManager.cpp:1785: performing map align task (RemovePlayerAlignTask)
5/15/2016 11:12:34 PM 496.888 Info MultiplayerManager.cpp:1809: networkTick(29169) mapTick(36) finishing removing peer(1) hasPeer(false)
5/15/2016 11:12:34 PM 496.888 Info NetworkInputHandler.cpp:544: expectedMapTick(36) removing peer(1) success(false).
5/15/2016 11:12:34 PM 496.888 Info Synchronizer.cpp:516: networkTick(29169) removing peer(1) success(false).
5/15/2016 11:12:34 PM 496.888 Info MultiplayerManager.cpp:913: networkTick(29169) mapTick(36) changing state from(InGameWaitingForOthers) to(InGame)
5/15/2016 11:12:34 PM 496.888 Info MultiplayerManager.cpp:1607: networkTick(29169) mapTick(36) peerID(0) fullStateLog: local state(InGame) local peers(((peerID(0) state(InGameWaitingForOthers) mapAlignTick(-1))
5/15/2016 11:12:34 PM)
5/15/2016 11:12:34 PM 496.988 Info MultiplayerManager.cpp:1060: networkTick(29175) mapTick(36) received stateChanged peerID(0) oldState(InGameWaitingForOthers) newState(InGame)
bkach commented 8 years ago

Hey bkuhl - I haven't seen this before. What's your iptables look like?

zopanix commented 8 years ago

Hey, I suggest changing the port because it doesn't work if you set the same port ( on my machine ) because of some conflict. Didn't look to far into this issue because I run Factorio on a server. And to test the image locally, changing the port was sufficient... Bud honestly, I didn't do a lot of testing on port numbers and in running the image locally. I've exposed a couple on the Internet and had some running on a local network... I've never had any problem with it... I've just noticed a bug bud it's in factorio itself when playing with the "same" character on different PC's and with steam cloud sync. Things get a bit messed up and rebooting the container fixes the problem.

I'm sorry to leave you like that bud I don't really have a lot of time lately. Hope you find the root cause and if changing anything in the dockefile can help, just make a pull request.

bkuhl commented 8 years ago

By no means would I expect you to provide support for running a server. Thanks for your response and providing this docker container.

bkuhl commented 8 years ago

I have a running thread on the forums about this as well - https://forums.factorio.com/viewtopic.php?f=49&t=25367&p=160242

@bkach I believe iptables are correct given that I'm seeing logs within the container due to a successful connection. Rancher manages iptables based on the port/traffic information I provide in the GUI.

zopanix commented 8 years ago

I'm going to close this issue.

Sorry I couldn't help