Forcing TCP sockets to close ?

Noah Fields noah at concord.org
Sat May 8 19:55:09 EDT 1999


I just recently had a postgres server die on me.  It left a ton of sockets
quasi open.. ( my understanding of socket states is bad... ) :

results of netstat look like this for many pages:

<<<
tcp        1      0 localhost:1446          localhost:5432          CLOSE_WAIT
tcp        1      0 localhost:1445          localhost:5432          CLOSE_WAIT
tcp        1      0 localhost:1444          localhost:5432          CLOSE_WAIT
tcp        1      0 localhost:1443          localhost:5432          CLOSE_WAIT
tcp        1      0 localhost:1442          localhost:5432          CLOSE_WAIT
>>>

Now, if I restart the deamon, and try to connect to localhost 5432 it
complains.  and sais I am not allowed :(

<<<
$ telnet localhost 5432
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
<<<

I dont understand this, but more over, is there a way just to tell the TCP
stack to dump those old sockets?


Thanks for any help,

-N
___________________________________________________________________
Noah Fields :: noah at concord.org :: W 978.371.3480 :: C 617.699.4044
___________________________________________________________________
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list