[zeromq-dev] Remote client does not receive any messages

Andreas Bauer dabukster at gmail.com
Mon Dec 1 22:42:16 CET 2014

The code for the test cases is just the one I’ve already attached. Really nothing more.

But true, it was a strange network issue. I’ve overlooked that my test server’s firewall (Macbook) hat an accepting but also a denying rule for incoming traffic for java programs… Sometime, just talking about a problem, helps :)

Am 1. Dezember 2014 bei 15:11:11, Hintjens Pieter (ph at imatix.com) schrieb:

Could you provide complete minimal test cases for both sides?

As you move pieces to remote boxes, some things take more time. Could
just be that, nothing weird at the network level.


On Sat, Nov 29, 2014 at 5:22 PM, Andreas Bauer <dabukster at gmail.com> wrote:
> Hi,
> it’s one of the standard and basic „can’t receive message" problem
> questions, but I’m not able to spot the error...
> I have implemented a simple client and a server using PUB/SUB in java using
> jeromq 0.3.2 according to the examples in the wiki.
> If I execute both programms locally, the client receives data. If I deploy
> the same client jar without change on a remote computer and run it, I don't
> receive any messages.
> The client is always using the ip (not „localhost" as hard coded string) of
> the server in both cases. Thus no changes here for the remote deployment.
> Firewall should not be an issue either, as the netstat excerpt below shows
> (Interestingly netstat -a for 0.3.2 shows the below entry, 0.3.4 does not…).
> The server (for test purpose my Macbook Air) does also not block any
> outgoing traffic.
> Any hints? Somehow I'm not able to spot the error (probably something
> stupid, but too blind to see…)
> Server.java
> ZMQ.Context context = ZMQ.context(1);
> ZMQ.Socket publisher = context.socket(ZMQ.PUB);
> publisher.bind("tcp://*:5556");
> Client.java
> ZMQ.Context context = ZMQ.context(1);
> ZMQ.Socket subscriber = zmqContext.socket(ZMQ.SUB);
> subscriber.connect("tcp://");
> subscriber.subscribe("".getBytes());
> Firewall shouldn't be an issue either
> netstat -a | grep 5556
> says
> tcp 0 1 SYN_SENT
> Finally my iptables config, just in case I made a stupid configuration
> mistake here.
> *filter
> :INPUT DROP [0:0]
> :OUTPUT ACCEPT [1161:105847]
> -A INPUT -i lo -j ACCEPT
> Best regards,
> Andreas
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141201/52bdcf0a/attachment.htm>

More information about the zeromq-dev mailing list