[zeromq-dev] tcp_connecter Assertion failed

rad jan jan.rad at gmail.com
Thu Jul 1 06:03:33 CEST 2010

Hi, folks,

Thanks for your great work!

We use zmq as the message system between modules on different servers.
The servers are in an unreliable environment, e.g. I may connect to a server
but its actual state is down or some server's network may fail for a while.

There are two circumstances where I get assertion failed.
1. When I tried to connect to a server that has not started yet. (Does not
happen all the time)
2. When a connected server's network is failed.
I am using zmq2.0.7 with python binding.
Here is some sample code:

>>> import zmq
>>> c = zmq.Context()
>>> addrs = ['tcp://', 'tcp://', 'tcp://']
>>> sockets = []
>>> for addr in addrs:
...     s = c.socket(zmq.XREQ)
...     s.connect(addr)
...     sockets.append(s)
>>> Assertion failed: err == ECONNREFUSED || err == ETIMEDOUT
Terminated (core dumped)

Is there any way to get rid of this error?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100701/996e848c/attachment.htm>

More information about the zeromq-dev mailing list