Closed zhao-kun closed 3 years ago
I leverage the nicolaka/netshoot to enter our pod network namespace, but there are too many half-closed connections in network namespace, it's abnormal and should be fixed.
nicolaka/netshoot
tcp 0 0 127.0.0.1:8778 0.0.0.0:* LISTEN tcp 162 0 127.0.0.1:59614 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:59856 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:60146 ESTABLISHED tcp 162 0 127.0.0.1:59678 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:59946 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:59502 FIN_WAIT2 tcp 161 0 127.0.0.1:60204 127.0.0.1:8778 ESTABLISHED tcp 1 0 127.0.0.1:59502 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:60004 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:59678 FIN_WAIT2 tcp 161 0 127.0.0.1:60146 127.0.0.1:8778 ESTABLISHED tcp 0 0 127.0.0.1:8778 127.0.0.1:60110 ESTABLISHED tcp 162 0 127.0.0.1:59912 127.0.0.1:8778 CLOSE_WAIT tcp 1 0 127.0.0.1:59544 127.0.0.1:8778 CLOSE_WAIT tcp 162 0 127.0.0.1:59438 127.0.0.1:8778 CLOSE_WAIT tcp 161 0 127.0.0.1:60110 127.0.0.1:8778 ESTABLISHED tcp 6 0 127.0.0.1:59338 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:59752 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:59544 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:59614 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:60052 ESTABLISHED tcp 162 0 127.0.0.1:59946 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:59912 FIN_WAIT2 tcp 0 0 127.0.0.1:8778 127.0.0.1:59438 FIN_WAIT2 tcp 1 0 127.0.0.1:59752 127.0.0.1:8778 CLOSE_WAIT tcp 162 0 127.0.0.1:59810 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:59810 FIN_WAIT2 tcp 162 0 127.0.0.1:59654 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:59654 FIN_WAIT2 tcp 1 0 127.0.0.1:59856 127.0.0.1:8778 CLOSE_WAIT tcp 161 0 127.0.0.1:60052 127.0.0.1:8778 ESTABLISHED tcp 1 0 127.0.0.1:60004 127.0.0.1:8778 CLOSE_WAIT tcp 0 0 127.0.0.1:8778 127.0.0.1:60204 ESTABLISHED
It seems that the sidecar immaturely close connections
8778 is the port of JMX over HTTP heartbeat. Seems that I forget to call response.Body.Close() in Golang. Fix it already.
8778
response.Body.Close()
fixed by https://github.com/megaease/easegateway/commit/8f9b9360a7df06bcc935f3c9b45b50a6665b7807
I leverage the
nicolaka/netshoot
to enter our pod network namespace, but there are too many half-closed connections in network namespace, it's abnormal and should be fixed.