On Fri, 2004-10-01 at 13:28 -0700, Bryan Murdock wrote: > 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?
Well it was probably a kill -9 that probably caused the problem. Normal kill should cause the program to close sockets normally. If sockets have their listening process abruptly torn from them, they stay open (because there's no one to close them) and eventually time out. This is a kernel function. In linux, you can adjust the socket timeout in /proc. On HPUX, I have no idea. But I remember from programming back in the day in the CS Dept on HPUX that the timeout is quite long. Linux by default times out after about 5 minutes I think. > > 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
