Nicholas Palko
Nicholas Palko

Reputation: 833

ZeroMQ C++ multi-threaded server example runtime error

I'm trying to run the ZeroMQ multithreaded C++ server example, which builds fine with

$ g++ server.cpp -lpthread -lzmq -o server -Wall

Using OS X 10.6.5, gcc version 4.2.1 (Apple Inc. build 5664), and zeromq2's lastest master branch (Dec 1st). However I'm getting a runtime error immediately after I start the server (with ./server)

terminate called after throwing an instance of 'zmq::error_t'
what(): Operation not supported by device

Is the code provided on the blog no longer current? Or or have I misconfigured? ZMQ seems to be working fine for me otherwise on this machine (simple request/reply socket patterns).

Upvotes: 2

Views: 3098

Answers (1)

Nicholas Palko
Nicholas Palko

Reputation: 833

Ridiculous. "tcp://localhost:5555" will fail, but "tcp://127.0.0.1:5555" works fine.

Update 1:

/etc/hosts has an entry for localhost so I don't believe that's the problem. I've also tried using tcp://lo:5555 to no success.

Upvotes: 2

Related Questions