[zeromq-dev] PyZMQ recv() acts crazy on one machine

Thomas Johnson thomas.j.johnson at gmail.com
Sun Dec 29 09:01:34 CET 2013


Consider the following simple program:
#----CUT HERE----
#!/usr/bin/python
import zmq

context_push = zmq.Context(1)
socket_push = context_push.socket(zmq.PUSH)

context_pull = zmq.Context(1)
socket_pull = context_pull.socket(zmq.PULL)

socket_pull.bind("tcp://127.0.0.1:2000")
socket_push.connect("tcp://127.0.0.1:2000")

socket_push.send("Hello")
message = socket_pull.recv()
print "Got message: '%s'" % message
#----CUT HERE----


On machine A, as expected, it prints: Got message: 'Hello'
On machine B, it prints: Got message: ''

Separately from this program, Machine B also immediately raises a "Resource
temporarily unavailable" if I create a PULL socket and do a (blocking)
socket.recv() call. Strangely, it seems to hang if I do a
socket.recv(flags=zmq.NOBLOCK), almost as if the flag was being flipped.

Both A and B are Ubuntu precise, using pyzmq 14.0.1. B happens to have its
native language set as Russian, if that matters.

Any idea what is going on or what I'm doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131229/b0beadbc/attachment.htm>


More information about the zeromq-dev mailing list