RabbitMQ throws a no channel for RabbitMQ channel is null error for no apparent reason

1,356 views
Skip to first unread message

Nav

unread,
Mar 23, 2017, 6:46:53 AM3/23/17
to rabbitmq-users
My RabbitMQ instance on local Mac has always started properly and I have been able to create queues for more than a year. Suddenly though, it stopped working properly.

What happened?
The RabbitMQ broker starts up fine and I'm able to see the web console, graphs and queues. But when I run my program, I get the error "no channel for RabbitMQ (channel is null)". It's a timeout exception.

What I tried?
Searched, and tried the solutions mentioned on the internet. Didn't work. I uninstalled and reinstalled RabbitMQ using brew and deleted any local folders of RabbitMQ before reinstalling. My program was able to create queues again, but after shutting down the Mac and restarting, the same problem recurred. Uninstalled and reinstalled again, but the problem persists.

Do you know what could cause this issue and how to solve it? I'll be posting the error messages as a followup to this post.

Nav

unread,
Mar 23, 2017, 6:47:55 AM3/23/17
to rabbitmq-users
So RabbitMQ starts fine:

              RabbitMQ 3.6.1. Copyright (C) 2007-2016 Pivotal Software, Inc.
  ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
  ##  ##
  ##########  Logs: /usr/local/var/log/rabbitmq/rab...@localhost.log
  ######  ##        /usr/local/var/log/rabbitmq/rab...@localhost-sasl.log
  ##########
              Starting broker... completed with 10 plugins.

and then there's this error:

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)

Michael Klishin

unread,
Mar 23, 2017, 11:54:34 AM3/23/17
to rabbitm...@googlegroups.com
Upgrade to 3.6.8:

3.6.1 isn't going to get any sort of updates and you are 7 patch releases behind.

--
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, 3:53:08 AM3/24/17
to rabbitmq-users
The latest homebrew has version 3.6.6 of RabbitMQ. Installed that, but 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:16:11 AM3/24/17
to rabbitmq-users
Also matched the application's jar dependencies to the rabbitmq 3.6.6 version. Problem persists.

Michael Klishin

unread,
Mar 24, 2017, 6:37:13 AM3/24/17
to rabbitm...@googlegroups.com
I commented on the timeout you are getting here:

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.

There are other ways to install any version on MacOS, in fact, the Homebrew formula


On Fri, Mar 24, 2017 at 10:53 AM, Nav <navi...@searchlighthealth.com> wrote:
The latest homebrew has version 3.6.6 of RabbitMQ. Installed that, but problem persists.

On Thursday, March 23, 2017 at 9:24:34 PM UTC+5:30, Michael Klishin wrote:
Upgrade to 3.6.8:

3.6.1 isn't going to get any sort of updates and you are 7 patch releases behind.
On Thu, Mar 23, 2017 at 1:47 PM, Nav <navi...@searchlighthealth.com> wrote:
So RabbitMQ starts fine:

              RabbitMQ 3.6.1. Copyright (C) 2007-2016 Pivotal Software, Inc.
  ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
  ##  ##
  ##########  Logs: /usr/local/var/log/rabbitmq/rabb...@localhost.log
  ######  ##        /usr/local/var/log/rabbitmq/rabb...@localhost-sasl.log
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:39:23 AM3/24/17
to rabbitm...@googlegroups.com
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.

Also, please stick to one thread as having to respond with the same thing in 2 places
is annoying.

On Fri, Mar 24, 2017 at 1:37 PM, Michael Klishin <mkli...@pivotal.io> wrote:
I commented on the timeout you are getting here:

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.

There are other ways to install any version on MacOS, in fact, the Homebrew formula

Nav

unread,
Mar 24, 2017, 7:05:14 AM3/24/17
to rabbitmq-users
Sorry about the multiple threads post.

This is the /usr/local/var/log/rabbitmq/rab...@localhost.log
=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Server startup complete; 10 plugins started.
 * rabbitmq_management_visualiser
 * rabbitmq_management
 * rabbitmq_web_dispatch
 * webmachine
 * mochiweb
 * rabbitmq_stomp
 * rabbitmq_amqp1_0
 * rabbitmq_mqtt
 * rabbitmq_management_agent
 * amqp_client

=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table aggr_node_node_stats_coarse_node_node_stats with interval 5000.

=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table aggr_connection_stats_coarse_conn_stats with interval 5000.

=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table aggr_connection_stats_process_stats with interval 5000.

=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table channel_stats with interval 5000.

=INFO REPORT==== 24-Mar-2017::16:05:28 ===
Statistics garbage collector started for table connection_stats with interval 5000.

=INFO REPORT==== 24-Mar-2017::16:05:39 ===
accepting AMQP connection <0.26115.0> (127.0.0.1:50227 -> 127.0.0.1:5672)

=INFO REPORT==== 24-Mar-2017::16:05:44 ===
accepting AMQP connection <0.26151.0> (127.0.0.1:50228 -> 127.0.0.1:5672)

=WARNING REPORT==== 24-Mar-2017::16:05:47 ===
closing AMQP connection <0.26115.0> (127.0.0.1:50227 -> 127.0.0.1:5672):
client unexpectedly closed TCP connection

=INFO REPORT==== 24-Mar-2017::16:05:49 ===
accepting AMQP connection <0.26203.0> (127.0.0.1:50229 -> 127.0.0.1:5672)

=WARNING REPORT==== 24-Mar-2017::16:05:52 ===
closing AMQP connection <0.26151.0> (127.0.0.1:50228 -> 127.0.0.1:5672):
client unexpectedly closed TCP connection

=WARNING REPORT==== 24-Mar-2017::16:05:57 ===
closing AMQP connection <0.26203.0> (127.0.0.1:50229 -> 127.0.0.1:5672):
client unexpectedly closed TCP connection

and this is the code:
Exception occurs at the line
connection = factory.newConnection();, so I'm sure I'm not closing any connections which cause the RabbitMQ problem.
I disabled the antivirus and firewall but problem persists.

    private void connectToServer() throws Exception {
        log.info("Attempting to create a connection factory");
        ConnectionFactory factory = new ConnectionFactory();
        factory.setRequestedHeartbeat(6000);       
        factory.setHost(server);
        factory.setUsername(user);
        factory.setPassword(password);
        factory.setAutomaticRecoveryEnabled(true);
        connection = factory.newConnection();
        log.info("connection{}", connection);
        channel = connection.createChannel();
    }

Wireshark results:
Installed wireshark and observed the packets. There are a few red coloured bad TCP packets, but the majority of TCP packets are purple, so they seem to be going through.
No.     Time           Source                Destination           Protocol Length Info
      1 0.000000       127.0.0.1             127.0.0.1             TCP      68     49258 → 4369 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562020689 TSecr=0 SACK_PERM=1
      2 0.000085       127.0.0.1             127.0.0.1             TCP      68     4369 → 49258 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562020689 TSecr=562020689 SACK_PERM=1
      3 0.000107       127.0.0.1             127.0.0.1             TCP      56     49258 → 4369 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562020689 TSecr=562020689
      4 0.000123       127.0.0.1             127.0.0.1             TCP      56     [TCP Window Update] 4369 → 49258 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562020689
      6 0.000204       127.0.0.1             127.0.0.1             TCP      56     4369 → 49258 [ACK] Seq=1 Ack=10 Win=408288 Len=0 TSval=562020689 TSecr=562020689
      7 0.000227       127.0.0.1             127.0.0.1             EPMD     76     EPMD_PORT2_RESP OK rabbit port=25672
      8 0.000242       127.0.0.1             127.0.0.1             TCP      56     4369 → 49258 [FIN, ACK] Seq=21 Ack=10 Win=408288 Len=0 TSval=562020689 TSecr=562020689
      9 0.000246       127.0.0.1             127.0.0.1             TCP      56     49258 → 4369 [ACK] Seq=10 Ack=21 Win=408256 Len=0 TSval=562020689 TSecr=562020689
     10 0.000263       127.0.0.1             127.0.0.1             TCP      56     49258 → 4369 [ACK] Seq=10 Ack=22 Win=408256 Len=0 TSval=562020689 TSecr=562020689
     11 0.000269       127.0.0.1             127.0.0.1             TCP      56     [TCP Out-Of-Order] 4369 → 49258 [FIN, ACK] Seq=21 Ack=10 Win=408288 Len=0 TSval=562020689
     12 0.000277       127.0.0.1             127.0.0.1             TCP      56     [TCP Dup ACK 6#1] 4369 → 49258 [ACK] Seq=22 Ack=10 Win=408288 Len=0 TSval=562020689
     13 0.000284       127.0.0.1             127.0.0.1             TCP      56     [TCP Dup ACK 10#1] 49258 → 4369 [ACK] Seq=10 Ack=22 Win=408256 Len=0 TSval=562020689
     14 0.000301       127.0.0.1             127.0.0.1             TCP      56     49258 → 4369 [FIN, ACK] Seq=10 Ack=22 Win=408256 Len=0 TSval=562020689 TSecr=562020689
     15 0.000320       127.0.0.1             127.0.0.1             TCP      56     4369 → 49258 [ACK] Seq=22 Ack=11 Win=408288 Len=0 TSval=562020689 TSecr=562020689
     20 34.738306      127.0.0.1             127.0.0.1             TCP      68     49265 → 5672 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562055411 TSecr=0 SACK_PERM=1
     21 34.738438      127.0.0.1             127.0.0.1             TCP      68     5672 → 49265 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562055411 TSecr=562055411 SACK_PERM=1
     22 34.738487      127.0.0.1             127.0.0.1             TCP      56     49265 → 5672 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562055411 TSecr=562055411
     23 34.738534      127.0.0.1             127.0.0.1             TCP      56     [TCP Window Update] 5672 → 49265 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562055411
     24 34.750146      127.0.0.1             127.0.0.1             AMQP     64     Protocol-Header 0-9-1
     25 34.750187      127.0.0.1             127.0.0.1             TCP      56     5672 → 49265 [ACK] Seq=1 Ack=9 Win=408288 Len=0 TSval=562055422 TSecr=562055422
     26 39.758239      127.0.0.1             127.0.0.1             TCP      56     49265 → 5672 [FIN, ACK] Seq=9 Ack=1 Win=408288 Len=0 TSval=562060425 TSecr=562055422
     27 39.758282      127.0.0.1             127.0.0.1             TCP      56     5672 → 49265 [ACK] Seq=1 Ack=10 Win=408288 Len=0 TSval=562060425 TSecr=562060425
     28 39.758299      127.0.0.1             127.0.0.1             TCP      56     [TCP Dup ACK 22#1] 49265 → 5672 [ACK] Seq=10 Ack=1 Win=408288 Len=0 TSval=562060425 TSecr=562060425
     29 39.767564      127.0.0.1             127.0.0.1             TCP      68     49269 → 5672 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562060434 TSecr=0 SACK_PERM=1
     30 39.767625      127.0.0.1             127.0.0.1             TCP      68     5672 → 49269 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562060434 TSecr=562060434 SACK_PERM=1
     31 39.767644      127.0.0.1             127.0.0.1             TCP      56     49269 → 5672 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562060434 TSecr=562060434
     32 39.767658      127.0.0.1             127.0.0.1             TCP      56     [TCP Window Update] 5672 → 49269 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562060434 TSecr=562060434
     33 39.767876      127.0.0.1             127.0.0.1             AMQP     64     Protocol-Header 0-9-1
     34 39.767910      127.0.0.1             127.0.0.1             TCP      56     5672 → 49269 [ACK] Seq=1 Ack=9 Win=408288 Len=0 TSval=562060434 TSecr=562060434
     35 42.751610      127.0.0.1             127.0.0.1             AMQP     555    Connection.Start
     36 42.751723      127.0.0.1             127.0.0.1             TCP      44     49265 → 5672 [RST] Seq=10 Win=0 Len=0
     37 44.773437      127.0.0.1             127.0.0.1             TCP      56     49269 → 5672 [FIN, ACK] Seq=9 Ack=1 Win=408288 Len=0 TSval=562065436 TSecr=562060434
     38 44.773467      127.0.0.1             127.0.0.1             TCP      56     5672 → 49269 [ACK] Seq=1 Ack=10 Win=408288 Len=0 TSval=562065436 TSecr=562065436
     39 44.773479      127.0.0.1             127.0.0.1             TCP      56     [TCP Dup ACK 31#1] 49269 → 5672 [ACK] Seq=10 Ack=1 Win=408288 Len=0 TSval=562065436
     40 44.775943      127.0.0.1             127.0.0.1             TCP      68     49272 → 5672 [SYN] Seq=0 Win=65535 Len=0 MSS=16344 WS=32 TSval=562065438 TSecr=0 SACK_PERM=1
     41 44.776037      127.0.0.1             127.0.0.1             TCP      68     5672 → 49272 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=16344 WS=32 TSval=562065438 TSecr=562065438 SACK_PERM=1
     42 44.776057      127.0.0.1             127.0.0.1             TCP      56     49272 → 5672 [ACK] Seq=1 Ack=1 Win=408288 Len=0 TSval=562065438 TSecr=562065438

Michael Klishin

unread,
Mar 24, 2017, 7:40:04 AM3/24/17
to rabbitm...@googlegroups.com
According to the log RabbitMQ does accept a TCP connection and then
client closes TCP connection unexpectedly.

One scenario I can think of is that if your server is configured to use TLS on port 5672,
the client will connect but won't perform TLS handshake and also won't receive a connection.start from the server, thus timing out and closing its TCP connection.

What does rabb...@localhost-sasl.log contain?
What does rabbitmqctl environment output?

Nav

unread,
Mar 25, 2017, 8:36:14 AM3/25/17
to rabbitmq-users
I've attached relevant parts of both log files. Kind of hard to understand what is going on.
  ##########  Logs: /usr/local/var/log/rabbitmq/rabb...@localhost.log
  ######  ##        /usr/local/var/log/rabbitmq/rabb...@localhost-sasl.log
rabbit@localhost-sasl.log
rabbit@localhost.log

Michael Klishin

unread,
Mar 25, 2017, 4:01:08 PM3/25/17
to rabbitm...@googlegroups.com
There are no exceptions (only progress reports, which are normally disabled, by the way) in the SASL
log and no connections accepted in the regular log.

Something is up with networking on your machine. If there may be a VPN involved, disabled it and compare.
Sorry but we cannot possibly help you with this with more than outlining the tools useful for troubleshooting.

On Sat, Mar 25, 2017 at 3:36 PM, Nav <navi...@searchlighthealth.com> wrote:
I've attached relevant parts of both log files. Kind of hard to understand what is going on.


On Friday, March 24, 2017 at 5:10:04 PM UTC+5:30, Michael Klishin wrote:
According to the log RabbitMQ does accept a TCP connection and then
client closes TCP connection unexpectedly.

One scenario I can think of is that if your server is configured to use TLS on port 5672,
the client will connect but won't perform TLS handshake and also won't receive a connection.start from the server, thus timing out and closing its TCP connection.

What does rabb...@localhost-sasl.log contain?
What does rabbitmqctl environment output?

On 24 Mar 2017, at 14:05, Nav <navi...@searchlighthealth.com> wrote:

Sorry about the multiple threads post.

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.

Nav

unread,
Mar 31, 2017, 7:57:08 AM3/31/17
to rabbitmq-users
There's no VPN. If there's anything I could use to troubleshoot, please let me know.
I'm able to ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.053 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.100 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.104 ms
^C
--- localhost ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.053/0.086/0.104/0.023 ms

Am able to view the RabbitMQ management console on the browser via http://localhost:15672/#/

After starting the server: /usr/local/sbin/rabbitmq-server start,
Running rabbitmqctl start_app shows the message "Starting node rabbit@localhost ..."
Am i supposed to be able to ping the node rabbit@localhost too? Coz that doesn't ping. Why is rabbit@localhost called a 'node'?
I've disabled the firewall and antivirus and tried again. Still unable to get a channel. This is a Macbook Pro. When I push the code onto an Ubuntu server which has rabbitmq installed, everything works fine.




On Sunday, March 26, 2017 at 1:31:08 AM UTC+5:30, Michael Klishin wrote:
There are no exceptions (only progress reports, which are normally disabled, by the way) in the SASL
log and no connections accepted in the regular log.

Something is up with networking on your machine. If there may be a VPN involved, disabled it and compare.
Sorry but we cannot possibly help you with this with more than outlining the tools useful for troubleshooting.
On Sat, Mar 25, 2017 at 3:36 PM, Nav <navi...@searchlighthealth.com> wrote:
I've attached relevant parts of both log files. Kind of hard to understand what is going on.


On Friday, March 24, 2017 at 5:10:04 PM UTC+5:30, Michael Klishin wrote:
According to the log RabbitMQ does accept a TCP connection and then
client closes TCP connection unexpectedly.

One scenario I can think of is that if your server is configured to use TLS on port 5672,
the client will connect but won't perform TLS handshake and also won't receive a connection.start from the server, thus timing out and closing its TCP connection.

What does rabb...@localhost-sasl.log contain?
What does rabbitmqctl environment output?

On 24 Mar 2017, at 14:05, Nav <navi...@searchlighthealth.com> wrote:

Sorry about the multiple threads post.

Michael Klishin

unread,
Mar 31, 2017, 10:18:26 AM3/31/17
to rabbitm...@googlegroups.com
ping is a wonderful tool as it is a very deceptive one. `ping` DOES NOT use the same
protocol that TCP-based data service clients use (it uses ICMP), so the fact that you can ping a host
(in particular localhost) only tells you so much.

Take a traffic capture with Wireshark and take a look at it. RabbitMQ log that lists no accepted
connections means one of two things:

 * No TCP connections were accepted at all
 * Some were accepted but they sent no data *at all* (such connections are not logged to avoid log pollution)

Also check what kind of firewall or antivirus tools can be running on your machine
and whether you can connect to 127.0.0.1:5672 using telnet, for example.

The problem can be that RabbitMQ is listening on a different interface (by default it will listen
on all available interfaces, though), e.g. only on an IPv6 one. See http://rabbitmq.com/networking.html
and take a look at `rabbitmqctl environment` output.


On Sat, Mar 25, 2017 at 11:01 PM, Michael Klishin <mkli...@pivotal.io> wrote:
There are no exceptions (only progress reports, which are normally disabled, by the way) in the SASL
log and no connections accepted in the regular log.

Something is up with networking on your machine. If there may be a VPN involved, disabled it and compare.
Sorry but we cannot possibly help you with this with more than outlining the tools useful for troubleshooting.

Navin Ipe

unread,
Apr 13, 2017, 2:22:19 AM4/13/17
to rabbitm...@googlegroups.com
Ok so in my first post I mentioned I uninstalled, reinstalled and my code was able to create queues in RabbitMQ and after restarting, it couldn't. What happened during that time was, I did this when I was away from my office Wifi.

So realizing that, I just now switched off the Wifi on my Mac and viola! RabbitMQ is now working without any problem. The channels and queues are being created. Am investigating why this is causing a problem, but if you have any hints, they are most welcome. One odd thing that has happened now is my code isn't able to open a socket to MongoDB on localhost.
Something really is up with the networking.


You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/fcFFtVGzN3Y/unsubscribe.
To unsubscribe from this group and all its topics, 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.



--
Regards,
Navin

Michael Klishin

unread,
Apr 13, 2017, 3:02:07 AM4/13/17
to rabbitm...@googlegroups.com
Hostname resolution is very likely the issue.

See list archives for how VPN can affect it, for instance.

On Thu, 13 Apr 2017 at 08:22, Navin Ipe <navi...@searchlighthealth.com> wrote:
Ok so in my first post I mentioned I uninstalled, reinstalled and my code was able to create queues in RabbitMQ and after restarting, it couldn't. What happened during that time was, I did this when I was away from my office Wifi.

So realizing that, I just now switched off the Wifi on my Mac and viola! RabbitMQ is now working without any problem. The channels and queues are being created. Am investigating why this is causing a problem, but if you have any hints, they are most welcome. One odd thing that has happened now is my code isn't able to open a socket to MongoDB on localhost.
Something really is up with the networking.


On Fri, Mar 31, 2017 at 7:48 PM, Michael Klishin <mkli...@pivotal.io> wrote:
ping is a wonderful tool as it is a very deceptive one. `ping` DOES NOT use the same
protocol that TCP-based data service clients use (it uses ICMP), so the fact that you can ping a host
(in particular localhost) only tells you so much.

Take a traffic capture with Wireshark and take a look at it. RabbitMQ log that lists no accepted
connections means one of two things:

 * No TCP connections were accepted at all
 * Some were accepted but they sent no data *at all* (such connections are not logged to avoid log pollution)

Also check what kind of firewall or antivirus tools can be running on your machine
and whether you can connect to 127.0.0.1:5672 using telnet, for example.

The problem can be that RabbitMQ is listening on a different interface (by default it will listen
on all available interfaces, though), e.g. only on an IPv6 one. See http://rabbitmq.com/networking.html
and take a look at `rabbitmqctl environment` output.

On Sat, Mar 25, 2017 at 11:01 PM, Michael Klishin <mkli...@pivotal.io> wrote:
There are no exceptions (only progress reports, which are normally disabled, by the way) in the SASL
log and no connections accepted in the regular log.

Something is up with networking on your machine. If there may be a VPN involved, disabled it and compare.
Sorry but we cannot possibly help you with this with more than outlining the tools useful for troubleshooting.
On Sat, Mar 25, 2017 at 3:36 PM, Nav <navi...@searchlighthealth.com> wrote:
I've attached relevant parts of both log files. Kind of hard to understand what is going on.


On Friday, March 24, 2017 at 5:10:04 PM UTC+5:30, Michael Klishin wrote:
According to the log RabbitMQ does accept a TCP connection and then
client closes TCP connection unexpectedly.

One scenario I can think of is that if your server is configured to use TLS on port 5672,
the client will connect but won't perform TLS handshake and also won't receive a connection.start from the server, thus timing out and closing its TCP connection.

What does rabb...@localhost-sasl.log contain?
What does rabbitmqctl environment output?

On 24 Mar 2017, at 14:05, Nav <navi...@searchlighthealth.com> wrote:

Sorry about the multiple threads post.

  ##########  Logs: /usr/local/var/log/rabbitmq/rab...@localhost.log
  ######  ##        /usr/local/var/log/rabbitmq/rab...@localhost-sasl.log



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/fcFFtVGzN3Y/unsubscribe.
To unsubscribe from this group and all its topics, 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.



--
Regards,
Navin

--
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-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Staff Software Engineer, Pivotal/RabbitMQ

Navin Ipe

unread,
Apr 17, 2017, 4:54:45 AM4/17/17
to rabbitm...@googlegroups.com
Ok, so there was a hostname "Navs-MacBook-Pro" which rabbitmq was trying to access instead of localhost. Wasn't able to ping to this host either, so we just added this hostname to /etc/hosts as
127.0.0.1       Navs-MacBook-Pro
and now rabbitmq works fine.

Thanks for all the help Michael.

On Thu, Apr 13, 2017 at 12:31 PM, Michael Klishin <mkli...@pivotal.io> wrote:
Hostname resolution is very likely the issue.

See list archives for how VPN can affect it, for instance.
  ##########  Logs: /usr/local/var/log/rabbitmq/rabb...@localhost.log
  ######  ##        /usr/local/var/log/rabbitmq/rabb...@localhost-sasl.log
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



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/fcFFtVGzN3Y/unsubscribe.
To unsubscribe from this group and all its topics, 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.



--
Regards,
Navin

--
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.
--
Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/fcFFtVGzN3Y/unsubscribe.
To unsubscribe from this group and all its topics, 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.



--
Regards,
Navin
Reply all
Reply to author
Forward
0 new messages