[zeromq-dev] ZMQ occupies random TCP ports on Windows

Michał Sznajder michalsznajder at gmail.com
Tue Sep 27 17:51:54 CEST 2011


Hi all,

I have an application on Windows that is run in multiple instances on
many boxes. Instances may come an go in random order. Instances use
predefined "connection strings" to zmq_bind(). Both tcp:// and
inproc:// are in use.

Unfortunately ZMQ opens arbitrary TCP ports on Windows in order to
simulate socketpair(3) functionality [1] that is used by some kind of
signalling mechanism(?). As a result sometimes application port gets
occupied by another instance and my application fails to start.

Any idea how to workaround it? There was once discussion about this in
another context [2] but finished without any code changes...

Best Regards
Michal Sznajder

[1] https://github.com/zeromq/zeromq2-1/blob/master/src/signaler.cpp#L209
[2] http://thread.gmane.org/gmane.network.zeromq.devel/723/focus=786



More information about the zeromq-dev mailing list