-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZeroMQ will crash under Windows if port 5905 is in use by another process #1542
Comments
The original implementation of a Windows signaler socket used port 5905 instead of letting the OS choose a free port. This also required a global mutex to be locked to prevent simultaneously running zeromq programs from clashing. Unfortunately the mutex was implemented with an Event instead of a Mutex. Changing it to a Mutex would break compatibility with existing programs unless the port was also changed. The hardcoded value of 5905 in signaler.cpp is just to check what port was configured in config.hpp. If 5905 it uses back the old Event implementation else it uses a Mutex. If 0, it lets the OS choose a free port without requiring use of a global mutex. (This is the best solution imho) You could submit a PR to change the default value in config.hpp to 0. |
…er than crashing if 5905 is in use (zeromq#1542) -Added config.hpp to the source list so it shows up in generated projects -Remove CMAKE_BUILD_TYPE setting for generators that don't use it
Close issue as PR was accepted and merged. |
…er than crashing if 5905 is in use (zeromq/libzmq#1542) -Added config.hpp to the source list so it shows up in generated projects -Remove CMAKE_BUILD_TYPE setting for generators that don't use it
Client.exe (2492), 5905, 30487, TCP, Established Too many connections 5905 I asked this question, is there a problem with my usage? Or this mechanism to establish a local connection will lead to this problem |
This was fixed a good while ago, which version are you using? |
The use of port 5906 as the event_signaler_port is hard coded in two locations (signaler.cpp and config.hpp). If this port is already in use (in my case by RealVNC) then ZeroMQ will crash on the first call to WinSock select().
Shouldn't this port being in use be handled more gracefully and be caught at the actual setup of the sockets in signaler_t::make_fdpair()?
http://lists.zeromq.org/pipermail/zeromq-dev/2015-August/029451.html
The text was updated successfully, but these errors were encountered: