LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-27-2003, 12:25 PM   #1
Dek
LQ Newbie
 
Registered: Apr 2003
Distribution: RedHat 8.0 - Kernel 2.4.20-8
Posts: 28

Rep: Reputation: 15
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

Last edited by Dek; 04-27-2003 at 07:37 PM.
 
Old 04-27-2003, 03:56 PM   #2
nakkaya
Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
type top and locate pid of the lmule
then type kill <pid> as root this should sove your problem
 
Old 04-27-2003, 07:39 PM   #3
Dek
LQ Newbie
 
Registered: Apr 2003
Distribution: RedHat 8.0 - Kernel 2.4.20-8
Posts: 28

Original Poster
Rep: Reputation: 15
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

Last edited by Dek; 04-27-2003 at 07:43 PM.
 
Old 04-27-2003, 08:53 PM   #4
nakkaya
Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
some applocation work in two way core and gui when gui crash es core still runs. next time before judgeing first try it
 
Old 04-28-2003, 11:46 AM   #5
Dek
LQ Newbie
 
Registered: Apr 2003
Distribution: RedHat 8.0 - Kernel 2.4.20-8
Posts: 28

Original Poster
Rep: Reputation: 15
I see ... well i said i will try next time it crashes. Will keep you post in that thread.

Dek
 
Old 04-28-2003, 12:20 PM   #6
Stijn147
LQ Newbie
 
Registered: Apr 2003
Posts: 8

Rep: Reputation: 0
Try restarting xinetd:

# /etc/rc.d/initd.d/xinetd restart
 
Old 04-30-2003, 09:23 AM   #7
Dek
LQ Newbie
 
Registered: Apr 2003
Distribution: RedHat 8.0 - Kernel 2.4.20-8
Posts: 28

Original Poster
Rep: Reputation: 15
Top-killing PID is not working ; restarting xinetd is not working.

Any other idea ?

Dek
 
Old 04-30-2003, 10:56 AM   #8
tiberius
LQ Newbie
 
Registered: Apr 2003
Location: USA
Distribution: Mandrake
Posts: 3

Rep: Reputation: 0
kill -9

Terminate it!
 
Old 04-30-2003, 02:11 PM   #9
keevitaja
Member
 
Registered: Aug 2002
Location: Estonia
Distribution: XP PRO
Posts: 119

Rep: Reputation: 15
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.
 
Old 05-01-2003, 06:47 AM   #10
kc8tbe
Member
 
Registered: Feb 2003
Location: Cleveland, Ohio (USA)
Distribution: Gentoo, Kubuntu 6.06
Posts: 179

Rep: Reputation: 30
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.
 
Old 05-01-2003, 09:20 AM   #11
Dek
LQ Newbie
 
Registered: Apr 2003
Distribution: RedHat 8.0 - Kernel 2.4.20-8
Posts: 28

Original Poster
Rep: Reputation: 15
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

Last edited by Dek; 05-01-2003 at 08:40 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program crash data..? RoaCh Of DisCor Mandriva 2 03-20-2005 10:04 PM
This causes my program to crash/hang in C... Scrag Programming 1 12-18-2004 04:53 PM
C-Program: calloc() and free() using in while xxfunkxx Programming 10 12-06-2004 09:04 PM
Icewm background program in .xinitrc causing X crash qwijibow Linux - General 4 10-21-2003 11:25 PM
How could a program crash between 2 printf() 's? paul76 Programming 12 09-11-2003 12:17 PM


All times are GMT -5. The time now is 04:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration