Here is my problem : when i start a server on my machine, and when it crashes, i can't start again the server : it says :
error on setsockopt REUSEADDR: Invalid argument
error on setsockopt REUSEADDR
error on bind command: Address already in use
error on bind command
After, say 10 minutes, i can restart the server. Does anyone know how to avoid this ?
Cannot restart a server
Moderator: Board moderators
-
- Forum Aficionado
- Posts: 1994
- Joined: Tue Apr 29, 2003 5:55 pm
- Location: Minnesota, USA
- Contact:
Is the server running on Windows?
What about shutting down the process with the task manager window?
If the server is running on Linux..
1.) From a shell prompt type: ps aux | grep cross
2.) Look at the output for the crossfire process. Example:
504 16142 0.0 0.0 4096 920 pts/1 S Jan12 .crossloop
3.) See the second column? In this case, it's 16142 which is the process ID
4.) Use this command: kill 16142 (basically, kill <process_id>)
5.) Check again to make sure it died nicely, using: ps aux | grep cross
6.) If it's no longer listed, the server has been successfully killed
6a.) If the process is still listed, you may have to use this command: kill -9 <process_id>
This is just one way to stop the server under Linux.
What about shutting down the process with the task manager window?
If the server is running on Linux..
1.) From a shell prompt type: ps aux | grep cross
2.) Look at the output for the crossfire process. Example:
504 16142 0.0 0.0 4096 920 pts/1 S Jan12 .crossloop
3.) See the second column? In this case, it's 16142 which is the process ID
4.) Use this command: kill 16142 (basically, kill <process_id>)
5.) Check again to make sure it died nicely, using: ps aux | grep cross
6.) If it's no longer listed, the server has been successfully killed
6a.) If the process is still listed, you may have to use this command: kill -9 <process_id>
This is just one way to stop the server under Linux.

I just type "crossfire" in a xterm. (I have an imac with X11).
what's strange is that after some amount of time, i can restart the server.
NB : even if i kill X11 and restart it, i still can't resart the server before around 5 or 10 minutes. If i type CTRL C to stop the server, i can restart the server if noone was logged on the server, and i can't if someone was logged, even if i quit the client after.
what's strange is that after some amount of time, i can restart the server.
NB : even if i kill X11 and restart it, i still can't resart the server before around 5 or 10 minutes. If i type CTRL C to stop the server, i can restart the server if noone was logged on the server, and i can't if someone was logged, even if i quit the client after.
I think there exist 'debug' flags in socket code (not necessarily used in crossfire) that prevent a program from using a port which has been used as server port during 10 mins after the program exited.
Sounds like those flags are on, maybe?
Ie it's a system feature, to lock the port for 10m after server crashed.
Sounds like those flags are on, maybe?
Ie it's a system feature, to lock the port for 10m after server crashed.