[Spread-users] INET unable to bind to port - force kill?

Jonathan Stanton jonathan at cnds.jhu.edu
Thu Jul 26 18:38:11 EDT 2001


On Thu, Jul 26, 2001 at 06:44:01PM +0000, Abe Scwartz wrote:
> All -
> 
> When spread dies, I'd like to be able to kill it and restart it using 
> something like daemontools. The problem is, spread seems to hold on to the 
> port for a while. I've tried removing /tmp/4803 and force-killing all the 
> processes, but it still holds on to the port. fuser/netstat are of little 
> help.

This is an annoying problem that as far I know has no real solution because
it is a result of the way TCP works. The problem is not the /tmp/4803socket
but the inet socket bound to port 4803. If clients are connected to the
daemon when the daemon shuts down (or crashes) the daemon side does an
active close of the tcp connections it has with remote clients and that
leaves the port 4803 in TIME_WAIT state for between 30 seconds and 2
minutes depending on the OS. Since the kernel enforces this time limit
nothing an application can do will decrease it. 

If the clients are closed first then the problem does not coccur because
the daemon does a passive close.

If anyone has ideas on how to avoid this (or how othe rdaemons do it) I
would definitely be intereseted in hearing them. 

I apologize fo rtypos I'm over a low bandwidth link at the conference.

I'll catch up with stuff a little next week but I'm actually on vacation
next week. I'll integrate everything and get back about the ideas the week
after that.

Jonathan

Thanks to everyone for helping out while I'm gone.

 > 
> I'm using mod_log_spread, and my best guess is that they are holding the 
> release of the port up even after spread has died.
> 
> The end result is, when spread dies, it takes about 45 seconds to bring it 
> back up - and then apache has to be restarted. I'd like to use daemontools 
> to reduce this to a few seconds.
> 
> Is there a more graceful way to accomplish this? Or perhaps someone has had 
> a better experience with keeping spread from dying? The process either dies, 
> or I get the dreaded 'SP multicast' error.
> 
> Thanks again!
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> 
> _______________________________________________
> spread-users mailing list
> spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------





More information about the Spread-users mailing list