skywire icon indicating copy to clipboard operation
skywire copied to clipboard

Too many `CLOSE_WAIT` open connection

Open mrpalide opened this issue 3 years ago • 2 comments

Describe the bug During investigation on NM issue on deregister VPN, I found a problem on my VPN-Server machine. After a while (near 40 hours) of running visor, I cannot established any stcpr and sudph transport anymore and get timeout error due to Save transport: mt.client.Dial: handshake failed: read tcp 192.168.1.114:34190->194.5.192.160:37227: i/o timeout. Same for dmsg but with a different error, but timeout too. Also no logs be there (in vpn-server machine) about that. Then I checked open connections, I see that about 64 open connection with CLOSE_WAIT state be there.

tcp6      10      0 ubuntu-g1-small1-:37227 192-53-112-61.ip.:64299 CLOSE_WAIT 
tcp6      10      0 ubuntu-g1-small1-:37227 192-53-112-61.ip.:14328 CLOSE_WAIT 
tcp6      10      0 ubuntu-g1-small1-:37227 192-53-112-61.ip.:48993 CLOSE_WAIT 

192.54.112.61 is IP of NM service.

Seems after stopping VPN or remove transport itself, these open connections be there unfortunately. Unfortunately cannot reproduce it manually by stopping VPN client or removing transport.

Note: CLOSE_WAIT - Indicates that the server has received the first FIN signal from the client and the connection is in the process of being closed. This means the socket is waiting for the application to execute close()

mrpalide avatar Jun 03 '22 09:06 mrpalide

Seems to be hard to reproduce.

jdknives avatar Jun 27 '22 11:06 jdknives

skywire-logs.txt

same issue it seems

long running vpn server can't be connected to because of too many open connections, or max connections exceeded

0pcom avatar Dec 08 '22 16:12 0pcom