[zeromq-dev] Newbie Question: php-zmq and the "Divide and Conquer" Example - "Failed to bind the ZMQ: Address already in use"

Kermode Bear kermodebear at gmail.com
Tue Jan 4 19:21:09 CET 2011


Thank you so much for your fast reply.

> Martin Sustrik:
> Say on Linux the loopback interface is called 'lo'.
> The hostname of the local machine is 'localhost'.

I changed localhost to 'lo' and that seemed to do the trick. I did not
realize that I was binding to a particular interface - looks like I
should go back to the docs a bit more.

> Martin Sustrik:
> That looks like the port specified is already
> being used by another application.

I took a careful look at what I had written, and I had mistakenly used
bind() in the ventilator instead of connect(). A silly mistake, no
excuse for that one. Too much coffee and not enough food.

> Ian Barber:
> Just for reference as well, I translated the lot into PHP a little while back
> if you need any reference they may come in handy:
> https://github.com/ianbarber/zguide/tree/master/examples/PHP

This is fantastic. I didn't see these examples on the other site I had
been looking at
(https://github.com/imatix/zguide/tree/master/examples/PHP) so I
thought they might not have been written yet.

Thank you all so much for your help. I haven't been on such a
supportive mailing list in quite a while.

More information about the zeromq-dev mailing list