[zeromq-dev] ZeroMQ only working with local loopback

Damian Allen pixerati at gmail.com
Fri Aug 7 01:46:00 CEST 2015


Have no problems connecting server to client on the same machine. When I
push the client to another box on the same network, any attempt to connect
just times out. Is this a code issue or a local network issue? I've had no
other networking issues and I have all firewalls turned off.

Here's the code for the client and server. Like I said, these work fine
when on the same machine using 127.0.0.1, so I don't get why they'd fail to
connect when using the actual IP address of the server on separate boxes on
the same network…? They'll also connect on the same machine if I use that
machine's IP.

Client (C#):

    //Initialize the client socket to the specified IPAddress and port
    NetMQSocket create_client (string ServerIPAddress, string port)
    {
        ctx = NetMQContext.Create ();
        NetMQSocket theSocket = ctx.CreateRequestSocket();
        theSocket.Connect(string.Format("tcp://{0}:{1}”,ServerIPAddress,port));
        return theSocket;
    }

Server (Python):

def _runserver(serverIPAddress, handshake_port):
    sock = zmq.Context().socket(zmq.REP)
    print("\nWaiting to bind at %s on port %s\n" % (serverIPAddress,
handshake_port) )
    sock.bind('tcp://%s:%s' % (serverIPAddress, handshake_port)  )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150806/da5f4bf0/attachment.htm>


More information about the zeromq-dev mailing list