[rabbitmq-discuss] socket error while using rabbitmq and a NAT (Network address translation)

mysurf mail stammailbox at gmail.com
Tue Mar 1 09:14:14 GMT 2011

Thanks for your response.

I followed your advice and here are my results.
 I see myself in the connection list when I invoke a connection from a
computer that gets the exception. I see it with "starting"  status and
instantly it disappears. (I use new exchange name and no exchange is

I tried to follow your advice about the tracer but i didn't find enough info
about the file runjava.bat in 2.3.1 (it exists only in the 1.7.0 package.
not the 2.3.1.)

it happens from almost half of the servers. not only the ones with the NAT.

On Mon, Feb 28, 2011 at 5:34 PM, Emile Joubert <emile at rabbitmq.com> wrote:

> Hi,
> There is no reason why an AMQP connection won't work over NAT. This is
> equally for version 1.7.0 and 2.3.1. It is likely that the cause for this
> error is at the network layer.
> Does the broker logfile contain any other relevant messages other than the
> one about the abrupt disconnection?
> Can you get "rabbitmqctl list_connections" on the broker to list the
> connection from the client at any time?
> Are you able to establish an AMQP channel and issue the basicConsume(), or
> does the error occur earlier during connection establishment?
> Do you have any way of checking the state of the connection on the NAT
> device?
> Establishing the AMQP connection via the AMQP Tracer (
> http://www.rabbitmq.com/javadoc/com/rabbitmq/tools/Tracer.html ) might
> also provide useful diagnostic information.
> -Emile
> On 27/02/11 13:06, mysurf mail wrote:
>> Hi ,
>> I am writing a new mail because my last issue was solved .
>> It is just that on a certain computer my application stopped working.
>> So it is a new issue and I will explain and paste the exception below.
>> Basically, I did three things :
>> 1. I upgraded from 1.7.0 to 2.3.1 (installed a new erlang also)
>> 2. I upgraded the client jars
>> 3. changed the protocol to ack = true;
>> channel.basicConsume(queueName, true, queueingConsumer);
>> well, that certain computer is behind a firewall, and has a NAT (Network
>> Address Translation ).
>> It did work prior to the upgrade with the NAT (mySQL also handles it
>> pretty well).
>> with the same ports.
>> Maybe it is the bidirectional channel (since I added acking? I dont
>> think so...).
>> what I can see is that.
>> when the client tries to connect it writes in the logs
>> Connection closed abruptly
>> And now, behold, the exception :
> [...]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110301/304bf057/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list