Netstat: JeroMQ don't really close Sockets (after programm closed)
See original GitHub issueZeroMQTest.zip
I have a problem with open sockets, if java programm are closed. I extracted the important code from my large project. Run the code an open a comandLine. Run “netstat -a -n”. Now you see, that many sockets (ports >50.000) are waiting.
Closing ports in JeroMQ with (look at attached file)
_internalSocket.setReceiveTimeOut(1); _internalSocket.setLinger(1); _internalSocket.unbind(_internalConnectionString); _zeroMqContext.destroySocket(_internalSocket); _externalPeerSocket.setReceiveTimeOut(1); _externalPeerSocket.setLinger(1); _externalPeerSocket.disconnect(_externalConnectionString); _zeroMqContext.destroySocket(_externalPeerSocket); _zeroMqContext.destroy();
Note: The many starts and closeds simulate the many junit-test. There is the same problem.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
From what I see, TIME_WAIT is perfectly normal and is not something you should worry about.
A quick google search yields this SO post with a detailed explanation why TIME_WAIT happens: http://serverfault.com/a/329846
No response in over a year, and I think TIME_WAIT is expected behavior, as described above. Closing this issue.