[Cubicweb] ZMQ: IP address

Julien Cristau julien.cristau at logilab.fr
Wed Sep 25 17:22:24 CEST 2013


On Wed, Sep 25, 2013 at 17:16:34 +0200, Dimitri Papadopoulos Orfanos wrote:

> Hi,
> 
> I've noticed that ZMQ responds only when connecting to the specific
> IP that was set in all-in-one.conf. Examples:
> 
> 
> If all-in-one.conf contains:
>   zmq-repository-address=zmqpickle-tcp://127.0.0.1:8181
> then if 132.12.3.4 is my IP address:
>   $
>   $ telnet 127.0.0.1 8181
>   Trying 127.0.0.1...
>   Connected to 127.0.0.1.
>   Escape character is '^]'.
>   ...
>   $
>   $ telnet 132.12.3.4 8181
>   Trying 132.12.3.4...
>   telnet: Unable to connect to remote host: Connection refused
>   $
> 
> 
> If all-in-one.conf contains:
>   zmq-repository-address=zmqpickle-tcp://132.12.3.4:8181
> then:
>   $
>   $ telnet 127.0.0.1 8181
>   Trying 127.0.0.1...
>   telnet: Unable to connect to remote host: Connection refused
>   $
>   $ telnet 132.12.3.4 8181
>   Trying 132.12.3.4...
>   Connected to 132.12.13.4.
>   Escape character is '^]'.
>   ...
>   $
> 
> 
> Is this a ZMQ or CubicWeb feature? Do we have to hardcode the
> current IP address of the server in all-in-one.conf?
> 
> 
It's how the socket API works...  You can listen on the wildcard address
though, and connect using any of the machine's IPs you want.  See the
zmq_tcp(7) manpage.

Cheers,
Julien
-- 
Julien Cristau          <julien.cristau at logilab.fr>
Logilab		        http://www.logilab.fr/
Informatique scientifique & gestion de connaissances



More information about the Cubicweb mailing list