Author Topic: Servers don't unbind port after crashing?  (Read 2249 times)

0 Members and 1 Guest are viewing this topic.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Servers don't unbind port after crashing?
« on: June 12, 2007, 06:01:21 pm »
Whenever any of my servers crash or is kill -9'ed, UDP:23073 (or whatever the join port is) stays bound, but none of the other things do (like port or port+10 TCP)

Has anyone else seen this?  It prevents servers from being started after they're crashed or forcefully shut down, and this only started in 1.4.1 (or maybe 1.4.0, but I don't think so)

for those of you uninitiated in the ways of linux, you can view if a port is still bound by doing lsof | grep <port>

It might even happen when shut down properly, I'll be doing a lot more testing this weekend.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Servers don't unbind port after crashing?
« Reply #1 on: June 12, 2007, 09:45:19 pm »
I just tried it by kill -9 <pid> on one of my servers, it unbound the ports properly...
Whats your OS again?

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Servers don't unbind port after crashing?
« Reply #2 on: June 12, 2007, 10:24:37 pm »
Linux...



Maybe its only when they crash.  Are you running a modified version of the server or a distribution one?


Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Servers don't unbind port after crashing?
« Reply #4 on: June 13, 2007, 07:19:18 am »
the OS is Linux.  The distribution is Debian

get your terminology straight ;)


Offline chrisgbk

  • Inactive Staff
  • Veteran
  • *****
  • Posts: 1739
Re: Servers don't unbind port after crashing?
« Reply #6 on: June 13, 2007, 03:59:42 pm »
Whenever any of my servers crash or is kill -9'ed, UDP:23073 (or whatever the join port is) stays bound, but none of the other things do (like port or port+10 TCP)

Has anyone else seen this?  It prevents servers from being started after they're crashed or forcefully shut down, and this only started in 1.4.1 (or maybe 1.4.0, but I don't think so)

for those of you uninitiated in the ways of linux, you can view if a port is still bound by doing lsof | grep <port>

It might even happen when shut down properly, I'll be doing a lot more testing this weekend.

If it's happening with kill -9 (SIGKILL), theres nothing that can be done to fix it since that is the only unhookable signal; when you send that signal the recieving program never ever actually recieves it, the process is just outright terminated, without a chance to cleanup. Hence why support was added to the server to allow you to kill it with SIGTERM or SIGQUIT unless it froze in an infinite loop.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: Servers don't unbind port after crashing?
« Reply #7 on: June 13, 2007, 06:27:02 pm »
The only times I have to kill it with -9 is when it is otherwise crashed badly, and it maybe does it sometimes when shutting down properly.  I'll try to get more info