Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot restart server right away. #31

Open
DevRain2500 opened this issue Nov 4, 2016 · 7 comments
Open

Cannot restart server right away. #31

DevRain2500 opened this issue Nov 4, 2016 · 7 comments

Comments

@DevRain2500
Copy link

DevRain2500 commented Nov 4, 2016

You can not restart your server within a certain amount of time. You have to wait for the master server to clear out its entry.

Error:

03-11-2016 21:17:16|t01| INFO| Attempting to register on serverlist (//server-list)
03-11-2016 21:17:17|t01| INFO| Registration failed, response code: HTTP 409, body: {"result":false,"message":"Your server name is already used."}
03-11-2016 21:17:17|t01|ERROR| Failed to register on serverlist. Exit
SWBaseSocket::disconnect() error: Socket is not connected!
Press any key to continue . . .

Edit: Server was cleared from the master server, but the rorserver says it is still there.

@ohlidalp
Copy link
Member

ohlidalp commented Nov 4, 2016

It's true, the master server doesn't recognize server restarts. Every registration is considered new.

AFAIK the previous versions recognized restarted servers by IP + name. I'll restore the functionality.

@DevRain2500
Copy link
Author

@only-a-ptr How long does it take for the master server to clear out the entry? It says it is still registered, but does not show on http://multiplayer.rigsofrods.org/server-list

@ohlidalp
Copy link
Member

@Dogy144 Sorry for the late response.
It's 1500sec = 25min, but the cleanup is only done upon GET request (someone displays the serverlist): https://github.com/RigsOfRods/multiplayer.rigsofrods.org/blob/master/server-list.php#L108-L111 So it's possible that even after the timeout your registration will still fail because nobody did a GET in the meantime.

It's really bad design. At the very least, the cleanup should be done at every request type, so we're not looking at dirty data.

@AnotherFoxGuy
Copy link
Member

The problem is actually that the server doesn't shut down properly.
When you try to stop it, it crashes before sending a deregistration message to the master server

@DevRain2500
Copy link
Author

How would you shut it down properly then? The only way that I know of is closing the prompt.

@ohlidalp ohlidalp mentioned this issue Dec 21, 2016
@ohlidalp
Copy link
Member

@Dogy144 AFG says there's a bug in the server which causes bad shutdown.

I faintly recall this was also happening to me. I'll take a look at it: #35

@CuriousMike56
Copy link
Member

CuriousMike56 commented Feb 21, 2019

The master server currently just hides the server from the list, then deletes the entry later. It should delete the entry as soon the server fails to respond.
It's currently impossible to restart the server without manually removing the entry from the database or wait for the entry to be cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants