question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Netstat: JeroMQ don't really close Sockets (after programm closed)

See original GitHub issue

ZeroMQTest.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:closed
  • Created 8 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
msteinhoffcommented, Feb 8, 2016

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

0reactions
daveyarwoodcommented, Oct 5, 2017

No response in over a year, and I think TIME_WAIT is expected behavior, as described above. Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PUB - SUB sockets randomly stop working? · Issue #364
Hello, We are using ZMQ for our server (reactphp/zmq) and our client (zeromq/jeromq). We run multiple instances of the server and each ...
Read more >
Socket.Close doesn't really close tcp socket? (c#)
Doing so effectively disables send and receive on the socket, so it will not be accepting incoming data after you've closed it, even...
Read more >
Can the time a socket spends in TIMED-WAIT state be reduced?
It is normal for sockets to accumulate when a server is opening and closing sockets faster then the TIME-WAIT state will allow the...
Read more >
Ubuntu Manpage: netstat - Print network connections, routing ...
netstat - Print network connections, routing tables, interface statistics ... CLOSING Both sockets are shut down but we still don't have all our...
Read more >
The Linux netstat command: Analysis and troubleshooting ...
The foreign machine has closed both connections, but the local Dropbox process is not closing them, meaning the resources the sockets take ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found