[rabbitmq-discuss] Pika reconnection error

Jason J. W. Williams jasonjwwilliams at gmail.com
Mon Feb 21 00:04:38 GMT 2011

Hi Guys,

Having some issues with a test cluster setup. It's a 3-node cluster
with 2-disk and 1-RAM nodes. The RAM node is joined to both disk

rabbit at Phantome - disk
rabbit_1 at Phantome - disk
rabbit_2 at Phantome - RAM

In front of the cluster is an HAProxy instance listening on port 5670
doing simple round-robin TCP load balancing between the cluster

As long as all the nodes are running I can have my consumer connect
through the load balancer to any node and successfully consume.
Likewise with the producer. However, when I shutdown the node the
consumer is currently connected to and allow Pika to do the
reconnection, I get this error:

error: uncaptured python exception, closing channel
<pika.asyncore_adapter.RabbitDispatcher connected at 0x632350> (<class
'pika.exceptions.ChannelClosed'>:Connection.Close(class_id = 0,
method_id = 0, reply_code = 541, reply_text = 'INTERNAL_ERROR')

Every few seconds Pika will attempt to reconnect the consumer and the
error repeats. The only unusual error in the Rabbit logs occurs on the
first reconnection: https://gist.github.com/836441

The rest of the time during these errors the logs look like this:

The consumer is disconnecting and reconnecting to HAProxy because the
stats show the connection moving between backend nodes.

The producer continues to operate correctly through the load balancer.

Consumer code is here: https://gist.github.com/836445

Any help/ideas are greatly appreciated.  Thank you in advance.


More information about the rabbitmq-discuss mailing list