I have see similar behavior on CentOS with default network initialization subsystem. After I reconfigured to use `systemd-networkd` instead default network initialization, then i not see more "CLOSE_WAIT".
Could you reconfigure network using `systemd-networkd` and then retest.
Hey sergey, i could try this too. But as far as I understand it. CLOSE_WAIT is a issue by the application, not finally closing the session.
As described by [Crist Clark](http://unix.derkeiler.com/Mailing-Lists/SunManagers/2006-01/msg00367.html)
CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is waiting for the program at the local end to actually close its connection.
The problem is your program running on the local machine is not closing the socket. It is not a TCP tuning issue. A connection can (and quite correctly) stay in CLOSE_WAIT forever while the program holds the connection open.