SPUG: Closing HTTP::Daemon port

Andrew Sweger andrew at sweger.net
Sun Aug 10 22:26:16 CDT 2003


On Sun, 10 Aug 2003, Marc M. Adkins wrote:

> > What's netstat --inet say about the state of the socket?
> 
> It says TIME_WAIT from my daemon's port to another port on the same machine.

(I'm just talking out my /dev/random here.)  But that's just the closing
side of a tcp socket I thought. This shouldn't prevent a new listener from
binding to that port. If you don't have anything in LISTEN state on the
daemon port, shrug.

The netstat --inet option doesn't report ports that are listening by
default. Run as 'netstat -nl --inet' (that's dash-en-ell) to see who's
still listening. To see what programs (PIDs) are associated, use 'netstat
-nlp --inet'. Make it 'netstat -nap --inet' to see sockets in all states
(not just listeners).

If the daemon process has really gone away (got zombies?), what could be
holding on to that port (this is where dleonard will start telling us
about all kinds of horrors from deep inside the kernel)? If the proc is
still there with sockets hanging around, then there's something wrong with
the cleanup code.  If so, can you provide a chunk of code?

-- 
Andrew B. Sweger -- The great thing about multitasking is that several
                                things can go wrong at once.




More information about the spug-list mailing list