Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to force a TCP Port to unbind
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ninjabadger
Apprentice
Apprentice


Joined: 23 Apr 2003
Posts: 270
Location: Scotland

PostPosted: Wed Mar 22, 2006 10:32 am    Post subject: How to force a TCP Port to unbind Reply with quote

I just killed a process (RoR WEBrick) which i had ran as a Daemon. I cant find a better shutdown way that kill.

The problem is that the port i ran the application on is showing as still in use when i try to start the serveragain. Is there a way to force the old process off this port?

thanks
_________________
Is Microsoft Stronger?

No, no, no. Quicker, easier, more seductive.
Back to top
View user's profile Send private message
hermanng
Apprentice
Apprentice


Joined: 28 Jan 2004
Posts: 175
Location: Nussberg,Germany,Earth

PostPosted: Wed Mar 22, 2006 11:34 am    Post subject: Reply with quote

Hmm, the gentoo way of running a daemon is to have an appropriate file in /etc/init.d/. The shutdown of theses daemons is normally done by start-stop-daemon, which sends by default a signal 15 to the daemon process. Which signal did you send ? You surely had a look if the process really died, did you ? Also, tcp connections need some time, before they actually vanish - normally about 2 minutes (but it's configurable) IIRC.

hth
_________________
Hermann
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum