Free a used port after program crash
High,
I'm using lmule on my RedHat. Sometimes it crashes and then the port tcp 4662 is still used. I need to free the port in order to avoid reboot and simply reload lmule after a program crash. Any idea how i can do that ? Thanks in advance ! Dek |
type top and locate pid of the lmule
then type kill <pid> as root this should sove your problem |
What's the point in killing an already crashed application? It doesn't make sense.
I don't remember "ps -e" or "ps -u root" (or whatever account) showing it after the crash ... Yet i will try but i doubt it would be an efficient solution ... Any other suggestion ? Dek |
some applocation work in two way core and gui when gui crash es core still runs. next time before judgeing first try it :)
|
I see ... well i said i will try next time it crashes. Will keep you post in that thread.
Dek |
Try restarting xinetd:
# /etc/rc.d/initd.d/xinetd restart |
Top-killing PID is not working ; restarting xinetd is not working.
Any other idea ? Dek |
kill -9
Terminate it! |
the problem is FIN_WAIT connection. you can do nothing about it. use netstat -ta | grep 4662 to determine when all left connections are dead. then run lmule again.
|
Agreed. My lmule also used to crash on RH9 (although the latest version available via freshrpms.net apt is a lot more stable). The port usually became available again within 90 seconds of the crash.
|
Ok, that's interesting, very interesting. I will pay attention next time it crashes (of course it did not went you wait it to crash :) lol).
Thanks all of you ! Dek Addenda : Well it crash that night. At that moment "netstat" did not report the use of port 4662 (???), "netstat -ta | grep 4662" send nothing. So i launch again lmule and got the error 4662 unreachable. I quit. sent the command "netstat -ta | grep 4662" until no one use the port 4662. Then, i block the port 4662 in iptables and restart that one. And just after, reopen the port 4662 and restart iptables. I then go into the lmule directory in my user home and delete the con file (with size 0kb). I also delete the file in /temp/orbit-"myuser" the con file that where changed when i quit lmule. Consequence, i start lmule again and got a high ID. Maybe it was something to do with con files (created for each port opened). I will try to narrow my suspects later. It seems i solve my problem (i'll be sure the next time) and i hope these lines will help others. Dek |
All times are GMT -5. The time now is 05:55 PM. |