juanora
juanora

Reputation: 542

RabbitMQ - QueueDeclare hangs forever

RabbitMQ randomly stops answering, hanging forever when I am declaring/deleting a queue. Here is an example in my c# .net application:

_factory = new ConnectionFactory
            {
                HostName = HostName,
                UserName = UserName,
                Password = Password,
            };
            _connection = _factory.CreateConnection();
            _channel = _connection.CreateModel();
            var replyQueueName = _channel.QueueDeclare(QueueNameReply, true, false, false, null);

I get an exception of "The operation has timed out."

The funny thing is that I cant even delete a queue through the administration plugin. It just stop answering....and leave the connection opened. Another thing: running "rabbitmqctl list_queues" also is hanging, thats why I think is a rbmq server configuration problem.

Follow the logs:

=INFO REPORT==== 18-Oct-2017::18:04:06 === accepting AMQP connection <0.3288.0> (31.268.289.141:54314 -> 10.0.191.128:5672)

=INFO REPORT==== 18-Oct-2017::18:04:07 === connection <0.3288.0> (31.268.289.141:54314 -> 10.0.191.128:5672): user 'etraffic' authenticated and granted access to vhost '/'

=ERROR REPORT==== 18-Oct-2017::18:07:07 === closing AMQP connection <0.3288.0> (31.268.289.141:54314 -> 10.0.191.128:5672): missed heartbeats from client, timeout: 60s

Someone knows what is going on?

Upvotes: 4

Views: 912

Answers (2)

kolypto
kolypto

Reputation: 35314

In my case, where queueDeclare() hung, I found this in RabbitMQ logs:

operation queue.declare caused a channel exception precondition_failed: inequivalent arg 'durable' for queue 'my_queue' in vhost '/': received 'true' but current is 'false'

so perhaps, you are redeclaring a queue with some wrong parameter?

Upvotes: 0

Ricky Keane
Ricky Keane

Reputation: 1700

I had the same issue with a version of Rabbit running on a Windows machine. Stopping and starting the RabbitMQ service solved the problem.

Upvotes: 0

Related Questions