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

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


Hi,


I setup a trace at the client app server. Set the listen port and connection
port and got a log for the unsuccessful factory.newConnection() . I added it
in attached the tracelog.txt.

now regarding the other references you gave me

1 Protocol errors:
 Acknowledging with an unknown delivery tag
 Redeclaring exchanges with different parameters

you recommended not acking more than once. This whole thing started when we
upgraded the rabbitmq version and Matthias sujested we will change the
consumer to ack (i.e. we changed it to channel.basicConsume(queueName,
FALSE, queueingConsumer);)
(This is if I understood him right )
So How can I control the acking . How do I know if I ack more then once. I
think I never send an ack consciously. only through the subscibe .

I hope the second and the third will be solved with the trace.

and thanks again.

On Tue, Mar 1, 2011 at 3:41 PM, Emile Joubert <emile at rabbitmq.com> wrote:

> Hi,
>
>
> On 01/03/11 12:55, mysurf mail wrote:
>
>> Hi Emile,
>> I have a few questions:
>> 1. On the rabbitmq server we have a few Erlang versions. Should that
>> create a problem .
>>
>
> Keep in mind that different features of RabbitMQ have different minimum
> requirements (e.g. SSL and some plugins). This is especially important in a
> multi-version environment. It is best to use the latest version across the
> board if possible (unless it is an alpha version containing an A).
>
>

>  (For now, I finished removing the older ones, so currently we have only
>> 5.8.2 and the problem still exists
>> 2. I have added the logs file from the rabbitmq server. I am the ip that
>> ends with 170.120 and my last trial had an exception.
>>
>
> It is unusual to have the broker listen on port 1434. From the log there
> are at least 3 kinds of problems:
>
> 1 Protocol errors:
>  Acknowledging with an unknown delivery tag
>  Redeclaring exchanges with different parameters
>  These will lead to a channel or connection closure.
>
> 2 1-Mar-2011::14:15:02
>  Handshake timeout
>  This will close the connection
>
> 3 1-Mar-2011::14:18:46
>  Abrupt connection termination
>
> The first can be solved by making sure that you don't acknowledge messages
> more than once, and that you declare exchanges with identical parameters.
> The second and third may have a related root cause, which the tracer or
> network diagnostic tools should help to identify.
>
>
>  3. Now about that tracer. I have been having some hard time finding
>> documentation for it.
>> Should I run it from the client (it comes with the client packacge) or
>> in the server? I am running it in the client.
>> my rabbit node port is 1434.  so I am running it with
>> .\runjava.bat co m.rabbitmq.tools.Tracer 1434 192.168.100.251 5672
>> are my parameters ok ?
>>
>
> See http://www.rabbitmq.com/examples.html#tracer .
> Judging by your logfile you want to use 1434 as the connectPort argument
> instead of 5672.
>
>
>  I used rabbit node port as listenport and 5672 as connect port. I also
>> switched them but no luck . I didnt see anything on the cmd when I
>> invoked my produce command.
>> here it is
>>
>
> You should configure AMQP clients to connect to the tracer instead of to
> the broker directly. The port should be the one given as the first argument
> (listenPort) and the host should be the IP number of the machine running the
> tracer.
>
>
>
>
> -Emile
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110301/c5c30ca3/attachment-0001.htm>
-------------- next part --------------
C:\workspace\thirdparty\rabbitmq\rabbitmq-java-client-bin-2.3.1>.\runjava.bat co
m.rabbitmq.tools.Tracer 5673 192.168.100.251 1434


Usage: Tracer [<listenport> [<connecthost> [<connectport>]]]
Invoked as: Tracer 5673 192.168.100.251 1434
com.rabbitmq.tools.Tracer.WITHHOLD_INBOUND_HEARTBEATS = false
com.rabbitmq.tools.Tracer.WITHHOLD_OUTBOUND_HEARTBEATS = false
com.rabbitmq.tools.Tracer.NO_ASSEMBLE_FRAMES = false
com.rabbitmq.tools.Tracer.NO_DECODE_FRAMES = false
com.rabbitmq.tools.Tracer.SUPPRESS_COMMAND_BODIES = false
1298990430343: conn#0 ch#0 <- {#method<connection.start>(version-major=0,version
-minor=9,server properties={product=RabbitMQ, platform=Erlang/OTP, information=L
icensed under the MPL.  See http://www.rabbitmq.com/, copyright=Copyright (C) 20
07-2011 VMware, Inc., version=2.3.1},mechanisms=PLAIN AMQPLAIN,locales=en_US),nu
ll,""}
1298990430437: conn#0 ch#0 -> {#method<connection.start-ok>(client-properties={p
roduct=RabbitMQ, information=Licensed under the MPL. See http://www.rabbitmq.com
/, platform=Java, copyright=Copyright (C) 2007-2011 VMware, Inc., version=2.3.1}
,mechanism=PLAIN,response= guest guest,locale=en_US),null,""}
1298990430593: conn#0 ch#0 <- {#method<connection.tune>(channel-max=0,frame-max=
131072,heartbeat=0),null,""}
1298990430593: conn#0 ch#0 -> {#method<connection.tune-ok>(channel-max=0,frame-m
ax=131072,heartbeat=30),null,""}
1298990430609: conn#0 ch#0 -> {#method<connection.open>(virtual-host=/,capabilit
ies=,insist=false),null,""}
1298990430796: conn#0 ch#0 <- {#method<connection.open-ok>(known-hosts=),null,""
}
1298990430812: conn#0 ch#1 -> {#method<channel.open>(out-of-band=),null,""}
1298990431000: conn#0 ch#1 <- {#method<channel.open-ok>(channel-id=),null,""}
1298990431000: conn#0 ch#1 -> {#method<exchange.declare>(ticket=0,exchange=toMan
ager,type=direct,passive=false,durable=false,auto-delete=false,internal=false,no
wait=false,arguments={}),null,""}
1298990431296: conn#0 ch#1 <- {#method<exchange.declare-ok>(),null,""}
1298990431296: conn#0 ch#1 -> {#method<queue.declare>(ticket=0,queue=,passive=fa
lse,durable=false,exclusive=false,auto-delete=false,nowait=false,arguments={}),n
ull,""}
1298990431531: conn#0 ch#1 <- {#method<queue.declare-ok>(queue=amq.gen-Ip9tTe7JX
G83iXqJQbld7w==,message-count=0,consumer-count=0),null,""}
1298990431531: conn#0 ch#1 -> {#method<queue.bind>(ticket=0,queue=,exchange=toMa
nager,routing-key=rtk,nowait=false,arguments={}),null,""}
1298990431718: conn#0 ch#1 <- {#method<queue.bind-ok>(),null,""}
1298990431718: conn#0 ch#1 -> {#method<basic.consume>(ticket=0,queue=,consumer-t
ag=,no-local=false,no-ack=false,exclusive=false,nowait=false,arguments={}),null,
""}
1298990431921: conn#0 ch#1 <- {#method<basic.consume-ok>(consumer-tag=amq.ctag-9
f5ZhEsESDHdJtp1jbv3iA==),null,""}
1298990460625: conn#0 ch#0 -> Frame(type=8, channel=0, 0 bytes of payload)
1298990460843: conn#0 ch#0 <- Frame(type=8, channel=0, 0 bytes of payload)


More information about the rabbitmq-discuss mailing list