your server is in the FIN_WAIT_2 state, which means it is waiting for the client to close its connection (it needs to send the server a FIN.) after this, your server should go from FIN_WAIT_2 to CLOSE_WAIT, and final it will close.
if your client doesn't send the FIN, then it will be in this "deadlock" state forever. :-( ie. your client is being bad. richard stevens indicates that some BSD derived TCP stacks put a limit of 10 minutes or so, and then it kills it - but i don't know much about hpux. so, have you kill -9'd the client? cuz that's the bad guy here. otherwise, change your port and go at it again (and make sure you have SO_REUSEADDR set.) hope this helps a little bit. ;-) Josh Coates http://www.jcoates.org -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bryan Murdock Sent: Friday, October 01, 2004 2:28 PM To: BYU Unix Users Group Subject: [uug] how to clean up used tcp ports I've got some a strange problem I don't know how to fix on HP-UX. A program wigged out, I killed it, and now the port it was using is still showing up when I do a netstat -a, on both ends. On one machine I see this: server1>netstat -a | grep 1802 tcp 0 0 server1.1802 server2.62775 CLOSE_WAIT tcp 0 0 server1.1802 server2.55242 CLOSE_WAIT And on the other I see this: server2>netstat -a | grep 1802 tcp 0 0 server2.62775 server1.1802 FIN_WAIT_2 tcp 0 0 server2.55242 server1.1802 FIN_WAIT_2 It's been that way for a good half an hour now. If I try and just restart this program it just complains about the port 1802 already being in use. Is there a way to manually shut down these ports on these machines, sort of like a kill -9? Thanks, Bryan ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
