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

Theodore Hickman ted.hickman at prohosters.com
Thu Jul 26 18:39:38 EDT 2001

Doesn't kill -HUP hang it up?
-- tdh

-----Original Message-----
From: spread-users-admin at lists.spread.org
[mailto:spread-users-admin at lists.spread.org] On Behalf Of Jonathan
Sent: Thursday, July 26, 2001 6:38 PM
To: Abe Scwartz
Cc: spread-users at lists.spread.org
Subject: Re: [Spread-users] INET unable to bind to port - force kill?

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
> port for a while. I've tried removing /tmp/4803 and force-killing all
> processes, but it still holds on to the port. fuser/netstat are of
> help.

This is an annoying problem that as far I know has no real solution
it is a result of the way TCP works. The problem is not the
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
after that.


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
> 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
> 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
> or I get the dreaded 'SP multicast' error.
> Thanks again!
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> _______________________________________________
> 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    

spread-users mailing list
spread-users at lists.spread.org

More information about the Spread-users mailing list