[zeromq-dev] ZMQ occupies random TCP ports on Windows
cremes.devlist at mac.com
Tue Sep 27 18:01:22 CEST 2011
On Sep 27, 2011, at 10:51 AM, Michał Sznajder wrote:
> 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  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  but finished without any code changes...
The only workaround is to change your transport from ipc to tcp and pick some specific ports to use. A permanent fix is awaiting "real" ipc support on Windows. There are a few people poking at this but there haven't been any code drops from them in months that address this issue.
More information about the zeromq-dev