Re: [rabbitmq-users] Core.MetricsProcessor - no channel for RabbitMQ!!! (channel is null)

43 views
Skip to first unread message

Michael Klishin

unread,
Mar 23, 2017, 1:59:34 PM3/23/17
to rabbitm...@googlegroups.com
Operation timeouts is a fact of life in distributed systems. In your case it happens
in AMQConnection#start. Reasons can vary from genuine TCP connectivity issues
to a connection attempt to a TLS port without TLS configured in the client (or vice versa),
and so on.

See server logs and take a traffic capture (https://www.rabbitmq.com/amqp-wireshark.html) if this can be reproduced reliably to narrow
down the root cause.

While at it, you might want to upgrade from Java client 3.6.2, for example, recent versions
have configurable continuation timeouts (not really relevant in this particular case).

On Thu, Mar 23, 2017 at 1:37 PM, Nav <navi...@searchlighthealth.com> wrote:
I'm getting a strange error with RabbitMQ, that doesn't go away even after uninstalling and reinstalling via brew on a Mac.
Although RabbitMQ starts the broker each time and I'm able to see the queues and graphs on the web console, when I run my program, it throws an error that there is no channel.
The odd part about it is that this error just started occurring one fine day, without me making any code changes. One time after uninstalling and reinstalling, it worked without any problem. But after shutting down and starting the Mac, it stopped working again. Even uninstalling and reinstalling didn't work.

Do you know what causes this kind of error in the way I'm facing it? I've searched online, but the solutions didn't help.


16:00:48.694 [main] ERROR c.slh.myprog.Core.MetricsProcessor - RabbitMQ error in MetricsProcessor ctor null, null, {}
java.util.concurrent.TimeoutException: null
    at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:77) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:111) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:37) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:367) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:293) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:37) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:93) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:805) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767) ~[amqp-client-3.6.2.jar!/:na]
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:857) ~[amqp-client-3.6.2.jar!/:na]
    at com.slh.myprog.utils.RabbitMQ.connectToServer(RabbitMQ.java:150) ~[classes!/:na]
    at com.slh.myprog.utils.RabbitMQ.getChannel(RabbitMQ.java:122) ~[classes!/:na]
    ...and some more error lines...
16:00:48.695 [pool-3-thread-1] ERROR c.slh.myprog.Core.MetricsProcessor - no channel for RabbitMQ!!! (channel is null)

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Nav

unread,
Mar 24, 2017, 4:47:36 AM3/24/17
to rabbitmq-users
I'm running rabbitmq on my local system. There has been no problem for more than a year. All of a sudden it started. I've made no changes to any port or TCP or TLS configs. After the problem started, it even worked one time without me making any changes. Then it stopped working again. Upgraded to 3.6.6 and the problem persists.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nav

unread,
Mar 24, 2017, 6:15:09 AM3/24/17
to rabbitmq-users
Tried with wireshark. The TCP packets do seem to be getting through. Is there something specific to watch out for?

Michael Klishin

unread,
Mar 24, 2017, 6:38:27 AM3/24/17
to rabbitm...@googlegroups.com
I don't know what `c.slh.myprog.Core.MetricsProcessor` does and you haven't posted
any server logs but the stack trace is pretty unambiguous: RabbitMQ Java client hits
a timeout when it tries to connect.

It's not uncommon to see hostname resolution timeouts on MacOS, e.g. when a machine is
connected to a VPN server that alters DNS settings, but this is something else. Server logs,
application code and a traffic dump together will lead you to a clue.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Mar 24, 2017, 6:54:35 AM3/24/17
to rabbitm...@googlegroups.com
"TCP packages seem to be getting through" is not sufficient for a successful handshake in many
protocols, including AMQP 0-9-1.

https://www.rabbitmq.com/amqp-wireshark.html mentions protocol methods. After TCP
connection is successful, the sequence is roughly the following:

 * Client sends a protocol preamble (which is a few bytes, `AMQP0091` IIRC)

[at this point RabbitMQ will log that a TCP connection was accepted]

 * Server sends a connection.start frame
 * Client responds with a connection.start-ok
 * Server sends a connection.tune frame
 * Client responds with a connection.tune-ok
 * Client sends a connection.open frame
 * Server either sends a connection.open-ok or closes the connection

[at this point in 3.6.8 RabbitMQ will log that authentication succeeded]

It may be a good idea to run a few tutorials in various languages to compare and see
if the problem affects them or just your application:



On Fri, Mar 24, 2017 at 1:15 PM, Nav <navi...@searchlighthealth.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages