Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
17 stars 16 forks source link

"Disconnecting from lobby server (broken connection detected)" #31

Closed abma closed 7 years ago

abma commented 7 years ago

when and why does this happens?

log of such an event:

http://paste.springfiles.com/view/raw/09a6f10b

Yaribz commented 7 years ago

just look at the warning or error lines:

20170918224255 - ERROR - [SpringLobbyInterface] Ignoring CLIENTSTATUS command (unknown user:"[ACE]Ticot") 20170918224255 - WARNING - [SPADS] Unable to store data for user "[ACE]Ticot" (user unknown)

=>

20170918224256 - WARNING - [SPADS] Disconnecting from lobby server (broken connection detected)

According to the log you provided the lobby server sent a "CLIENTSTATUS" command before the "ACCEPTED" command. This doesn't make sense of course, the corresponding client ([ACE]Ticot) hasn't even been declared to SPADS yet. => inconsistency detected => broken connection

abma commented 7 years ago

oh, that helps. thanks!

springraaar commented 11 months ago

Note, today spads hosts on the official server got disconnected due to these inconsistency check failures that get triggered by some event related to another host

20231214221049 - WARNING - [SpringLobbyInterface] Ignoring duplicate ADDUSER command for user "[HAK]Host2" 20231214221049 - WARNING - [SPADS] TrueSkill service unavailable! 20231214221049 - WARNING - [SPADS] Disconnecting from lobby server (broken connection detected) 20231214221049 - NOTICE - [SpringLobbyInterface] Disconnecting from lobby.springrts.com:8200

This has been happening today and it happens every few months.

Maybe it's a bug on the official server's side but anyway spads itself shouldn't just disconnect and exit!

Tizbac suggested editing spads.pl and changing the inconsistencyHandler assignment of $lobbyBrokenConnection=1 to 0 (lines 500 and 15538) to prevent this disconnection behavior from SPADS side and it's been working.

Yaribz commented 11 months ago

Maybe it's a bug on the official server's side but anyway spads itself shouldn't just disconnect and exit!

Indeed SPADS shouldn't exit in this case, it should just reconnect to the lobby server in the hope that the lobby server send consistent data this time. I managed to reproduce the problem, it should be fixed in next SPADS version.