Jump to content

Socket Port Already In Use


Recommended Posts

Hi,

I have rented a VPS and use SSH to get my DST servers running.  I had one running with caves just fine and then decided to try adding a second to see if my server provided could handle the extra server. I had a friend set it all up for me (Tonio) and it was running until I decided to stop both servers, change the mods and just the server name etc, and now the second server won't start. I get the following message at the bottom of my log when I try to run the start file:

Quote

[00:00:14]: [Error] Server failed to start!
[00:00:14]: Unhandled exception during server startup: RakNet UDP startup failed: SOCKET_PORT_ALREADY_IN_USE (5)
[00:00:14]: PushNetworkDisconnectEvent With Reason: "ID_DST_INITIALIZATION_FAILED", reset: false
[00:00:14]: Details: SOCKET_PORT_ALREADY_IN_USE
[00:00:14]: [Shard] Stopping shard mode
 

Both servers I want to run have caves. They have their own unique numbers in the settings.ini file. Is there somewhere else I need to check for these details? All four servers (2 overworlds with 2 caves) where running before I changed the name etc. I don't understand why it's not working now when I didn't change things in the main set up.

Any ideas?

Thanks :)

Link to comment
Share on other sites

Assuming the server's running a Linux distro the address and/or port will be kept bound for a bit after the process terminates in case the service needs the port again- it's sort of a cache system in case the program that let go of the binding wanted it again relatively quickly.

If you wait a bit then the address and/or port should allow to be rebound again.

 

With BSD Sockets in the C side one could override this with setsockopt's SO_REUSEADDR and/or SO_REUSEPORT to try and force a binding voiding any predetermined cache.

 

 

Though I'd also triple check every port is unique.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...