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

mysurf mail stammailbox at gmail.com
Wed Mar 2 12:38:36 GMT 2011


Hi,
I ran the multicast main . from the computer with the good connection it
seemed to work.
from the computer with the bad connection - it seemed to not work.

I was seconds away from taking this to the IT , but then I remembered that
both computes run the RabbitMQ client 1.7.0 successfully .

Maybe you can tell me what changed in the implementation of the 2.3.1 or the
erlang??

I am adding the output file for the multicast. it has outputs from both
computers.

I really appreciate your help. I hope this will resolve soon as we are in a
mess currently in the production system.
Thanks.


On Wed, Mar 2, 2011 at 1:01 PM, Emile Joubert <emile at rabbitmq.com> wrote:

>
> Hi,
>
> It is very strange to see an AMQP connection work perfectly via the tracer
> but fail without it.
>
> (Does the broker listen on the same port in both cases? If not, does the
> underlying network treat both ports the same?)
>
> Can you replicate these results with any of the built-in Java examples that
> are provided with RabbitMQ? I would suggest using the MulticastMain tool
> with and without the Tracer. This will eliminate the possibility of AMQP
> protocol errors causing the problem.
>
> > DataInputStream.readUnsignedByte()
> This is not the cause of the problem. It probably just means that the
> underlying connection has been forcefully closed.
>
>
> > It happens only from certain computers.
> Do these computers have anything in common with each other that they do not
> have in common with the computers that don't produce errors?
>
>
>
> -Emile
>
>
>
> On 02/03/11 09:41, mysurf mail wrote:
>
>>
>> We debugged the tracer and saw that it uses java.net.socket. The
>> connection was ok through the tracer.
>> Now,  we closed the tracer and connected directly to the rabbit.
>> We  attached the source and debugged factory.newconnmection() we saw the
>> exception occured in DataInputStream.readUnsignedByte() . (it throws an
>> EOFException when ch<0) .
>> any ideas?
>>
>> On Wed, Mar 2, 2011 at 9:41 AM, mysurf mail <stammailbox at gmail.com
>> <mailto:stammailbox at gmail.com>> wrote:
>>
>>    Flash News :
>>    I am sorry to bother you a lot this morning . But I have an
>>    interesting finding
>>    When I activate my client with the tracer - it connects well to the
>>    rabbitmq server .
>>    when I connect directly - it throws that exception .
>>
>>    So maybe my problem is with the connection string ?
>>    here it is - I only replace the  ip and port
>>    BasicChannel(Username, Password, VirtualHost, BrokerIp, BrokerPort,
>>    Heartbeat);
>>    BasicChannel(Username, Password, VirtualHost, "127.0.0.1",5672,
>>    Heartbeat);
>>
>>    and my ctor is
>>
>>    public BasicChannel(final String username, final String password, final
>> String virtualHost, final String brokerIp, final int brokerPort, int
>> heartbeat) {
>>             ConnectionFactory factory = new ConnectionFactory();
>>             factory.setUsername(username);
>>             factory.setPassword(password);
>>             factory.setVirtualHost(virtualHost);
>>             factory.setRequestedHeartbeat(heartbeat);
>>             factory.setHost(brokerIp);
>>             factory.setPort(brokerPort);
>>
>>             connection = null;
>>             try {
>>                 connection = factory.newConnection();
>>             } catch (IOException e) {
>>                 throw new PlatformException("could not create connection",
>> e);
>>             }
>>
>>
>>
>>    Thanks
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110302/4399b363/attachment.htm>
-------------- next part --------------
GoodComputer

C:\workspace\thirdparty\rabbitmq\rabbitmq-java-client-bin-2.3.1>runjava com.rabbitmq.e
starting consumer #0
starting producer #0
recving rate: 0 msg/s, min/avg/max latency: 4744/4744/4744 microseconds
sending rate: 16186 msg/s
recving rate: 11764 msg/s, min/avg/max latency: 1598/124824/277785 microseconds
recving rate: 10631 msg/s, min/avg/max latency: 267152/462700/609950 microseconds
sending rate: 16116 msg/s
sending rate: 16950 msg/s
recving rate: 11096 msg/s, min/avg/max latency: 607182/802149/941896 microseconds
sending rate: 16703 msg/s
recving rate: 11400 msg/s, min/avg/max latency: 937387/1117620/1270633 microseconds
recving rate: 11208 msg/s, min/avg/max latency: 1270782/1437044/1593934 microseconds
sending rate: 16596 msg/s
sending rate: 16562 msg/s
recving rate: 10827 msg/s, min/avg/max latency: 1593183/1797937/1986645 microseconds
recving rate: 11304 msg/s, min/avg/max latency: 1985082/2140123/2293316 microseconds
sending rate: 16652 msg/s
sending rate: 17220 msg/s
recving rate: 11227 msg/s, min/avg/max latency: 2290855/2443425/2622044 microseconds
sending rate: 16654 msg/s
recving rate: 10139 msg/s, min/avg/max latency: 2622215/2852111/3002576 microseconds
sending rate: 16555 msg/s
recving rate: 11057 msg/s, min/avg/max latency: 2995418/3177957/3362374 microseconds
sending rate: 17122 msg/s
recving rate: 11464 msg/s, min/avg/max latency: 3359459/3521971/3688621 microseconds
sending rate: 16755 msg/s
recving rate: 10929 msg/s, min/avg/max latency: 3687067/3868810/4061715 microseconds
sending rate: 16832 msg/s
recving rate: 9792 msg/s, min/avg/max latency: 4060436/4221286/4471434 microseconds
sending rate: 16683 msg/s
recving rate: 11018 msg/s, min/avg/max latency: 4471275/4637660/4818107 microseconds
sending rate: 16814 msg/s
recving rate: 11250 msg/s, min/avg/max latency: 4815837/4991481/5166424 microseconds
sending rate: 16994 msg/s
recving rate: 11511 msg/s, min/avg/max latency: 5158614/5312865/5484297 microseconds

BadComputer

C:\workspace\thirdparty\rabbitmq\rabbitmq-java-client-bin-2.3.1>runjava com.rabb
itmq.examples.MulticastMain -h 192.168.100.251 -p 1434  -e X1X1X1X1
starting consumer #0


More information about the rabbitmq-discuss mailing list