Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Forcing TCP sockets to close ?



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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org