We had a network network partition and RabbitMQ ended up in "split brain".
After the cluster recovered, I have a queue that I cant delete. In the mgmt. interface the queue is just listed with "?", and I'm unable to delete it from using mgmt. interface or from commandline.
I have tried to remove the node "sh-mq-cl1a-04" from the cluster, but the queue remains in the cluster.
A queue can be deleted from the RabbitMQ Management Interface. Enter the queue tab and go to the bottom of the page. You will find a dropdown "Delete / Purge". Press Delete to the left to delete the queue.
In the navigation pane, choose Queues. On the Queues page, choose the queue to delete. Choose Delete. In the Delete queue dialog box, confirm the deletion by entering delete .
To uninstall RabbitMQ and Erlang: Open the Control Panel. Select Uninstall a program. Right-click RabbitMQ Server, and then click Uninstall.
Then, log into the RabbitMQ console UI and go to the Admin tab. Expand the "All Policies" section and you should see your existing policies. We can clear all existing policies by clicking each one, expanding the "Delete this policy" section and clicking the button labeled "Delete this policy".
I had a similar issue where I couldn't delete some queues, and the solution listed here worked for me: https://community.pivotal.io/s/article/Queue-cant-be-deleted-or-purged-in-RabbitMQ
I ssh'd onto one of the nodes in my cluster (the one where the queue is hosted is probably best), sudo'd as root
, and then ran this command:
rabbitmqctl eval '{ok, Q} = rabbit_amqqueue:lookup(rabbit_misc:r(<<"VHOST">>, queue, <<"QUEUE">>)), rabbit_amqqueue:delete_crashed(Q).'
You'll need to replace VHOST
with your virtual host name, and QUEUE
with your queue name (which I realize it might be tricky to figure out, in your situation).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With