How do you delete a queue when the home node is permanently down?

1,137 views
Skip to first unread message

Brian Locke

unread,
Aug 21, 2015, 4:08:50 PM8/21/15
to rabbitmq-users
We are unable to use a queue because it's home node is on a server that used to be in the cluster and is no longer in existence.

How do you remove that queue or re-assign the home node so that it can be used again?

"home node 'rabbit@RABBITMQ5' of durable queue 's.03333003333.c.69' in vhost 'scanner_msgs' is down or inaccessible"

Thanks!
Brian

Michael Klishin

unread,
Aug 21, 2015, 6:16:17 PM8/21/15
to rabbitm...@googlegroups.com, Brian Locke
Brian,

Try this trick with policies:
https://groups.google.com/forum/#!searchin/rabbitmq-users/master$20queue/rabbitmq-users/bJNcrDVhWiU/iIVMIr9ARZAJ

H aving a rabbitmqctl command that does it would be helpful. We will consider
it but likely for a 3.6.x release.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Brian Locke

unread,
Aug 21, 2015, 6:30:40 PM8/21/15
to rabbitmq-users, brian...@datascan.com
Thanks for that. I also dug further back and found an 'eval' command to try.
Neither of these commands work. Not sure if it's my installation or not. 
RabbitMQ 3.54 , Erl 17.5, Windows Server 2012 R2

executing: rabbitmqctl set_policy --apply-to queues --priority 100 s.0024e00a18b9.c.69 '^s.0024e00a18b9.c.69$' '{"ha-mode":"nodes", "ha-params":["rabbit@RABBITMQ1"]}'

returns: Error: function_clause

executing: rabbitmqctl eval 'rabbit_amqqueue:internal_delete({resource,<<"scanner_msgs">>,queue,<<"s.0024e00a18b9.c.69">>}).'

returns: << was unexpected at this time.

I'll keep digging but please let me know if I've typoed something.

Thanks!

Michael Klishin

unread,
Aug 21, 2015, 6:42:24 PM8/21/15
to rabbitm...@googlegroups.com, Brian Locke, brian...@datascan.com
 On 22 August 2015 at 01:30:44, Brian Locke (brian...@datascan.com) wrote:
> Thanks for that. I also dug further back and found an 'eval' command
> to try.
> Neither of these commands work. Not sure if it's my installation
> or not.
> RabbitMQ 3.54 , Erl 17.5, Windows Server 2012 R2
>
> executing: rabbitmqctl set_policy --apply-to queues --priority
> 100 s.0024e00a18b9.c.69 '^s.0024e00a18b9.c.69$' '{"ha-mode":"nodes",
> "ha-params":["rabbit@RABBITMQ1"]}'
>
> returns: Error: function_clause
>
> executing: rabbitmqctl eval 'rabbit_amqqueue:internal_delete({resource,<<"scanner_msgs">>,queue,<<"s.0024e00a18b9.c.69">>}).'
>
> returns: << was unexpected at this time.
>
> I'll keep digging but please let me know if I've typoed something.

It's Windows shell escaping. Try double outer quotes instead of single ones.

Brian Locke

unread,
Aug 21, 2015, 6:49:47 PM8/21/15
to rabbitmq-users, brian...@datascan.com
Boy, talking about not seeing the 'forest for the trees'. I totally forgot that windows requires escaped quotes.
For future reference for Windows users, here's what the working command looks like:

rabbitmqctl eval "rabbit_amqqueue:internal_delete({resource,<<""scanner_msgs"">>,queue,<<""s.0024e00a18b9.c.69"">>})."

Thanks Michael!

Brian
Reply all
Reply to author
Forward
0 new messages