Unable to delete a dead queue from an old node of cluster

1,037 views
Skip to first unread message

Saurabh Gupta

unread,
Jul 5, 2018, 7:09:27 PM7/5/18
to rabbitmq-users
I am trying to remove a dead queue of an old removed node from the cluster. I followed the link https://groups.google.com/forum/#!msg/rabbitmq-users/rpO3dFzm-yQ/z9WhGkvXCAAJ but getting the error

Error:

{:undef, [{:rabbit_amqqueue, :internal_delete, [{:resource, "tasks", :queue, "SyncbotTask"}], []}, {:erl_eval, :do_apply, 6, [file: 'erl_eval.erl', line: 670]}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}

Commands I have tried

rabbitmqctl eval 'Q = {resource, <<"tasks">>, queue, <<"Task_Dead">>}, rabbit_amqqueue:internal_delete(Q).'

rabbitmqctl eval 'rabbit_amqqueue:internal_delete({resource,<<"tasks">>,queue,<<"Task_Dead">>}).'


Rabbit version :3.7.3

Erlang Version: Erlang 20.3

Regards,
Saurabh


Michael Klishin

unread,
Jul 6, 2018, 5:23:56 AM7/6/18
to rabbitm...@googlegroups.com
Are you sure that the CLI tools used come from the same RabbitMQ distribution (version) as the server?
The message says that a function invoked by CLI tools does not exist (undefined).

--
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

Saurabh Gupta

unread,
Jul 6, 2018, 11:11:13 AM7/6/18
to rabbitmq-users
Hey Michael,

I used rabbitmq-server-3.7.3-1.el7.noarch.rpm to install rabbitmq which also installed CLI tools, so the version number should be the same.

Saurabh


On Friday, 6 July 2018 02:23:56 UTC-7, Michael Klishin wrote:
Are you sure that the CLI tools used come from the same RabbitMQ distribution (version) as the server?
The message says that a function invoked by CLI tools does not exist (undefined).
On Fri, Jul 6, 2018 at 2:09 AM, Saurabh Gupta <guptasau...@gmail.com> wrote:
I am trying to remove a dead queue of an old removed node from the cluster. I followed the link https://groups.google.com/forum/#!msg/rabbitmq-users/rpO3dFzm-yQ/z9WhGkvXCAAJ but getting the error

Error:

{:undef, [{:rabbit_amqqueue, :internal_delete, [{:resource, "tasks", :queue, "SyncbotTask"}], []}, {:erl_eval, :do_apply, 6, [file: 'erl_eval.erl', line: 670]}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}

Commands I have tried

rabbitmqctl eval 'Q = {resource, <<"tasks">>, queue, <<"Task_Dead">>}, rabbit_amqqueue:internal_delete(Q).'

rabbitmqctl eval 'rabbit_amqqueue:internal_delete({resource,<<"tasks">>,queue,<<"Task_Dead">>}).'


Rabbit version :3.7.3

Erlang Version: Erlang 20.3

Regards,
Saurabh


--
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.

Michael Klishin

unread,
Jul 6, 2018, 12:06:24 PM7/6/18
to rabbitm...@googlegroups.com
Oh, so you are running `rabbitmqctl eval`. In that case you are responsible for calling
the correct function. In 3.7.x `rabbit_amqqueue:internal_delete` takes two arguments (acting user name is the second one).

However, with 3.7.7 it shouldn't even be necessary because in more cases the delete protocol method handler will
try to force delete queues without a promotable master: https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.5

Anyhow, the 3.7.x version of what you probably found in list archives is

rabbitmqctl eval 'Q = {resource, <<"virtual host name">>, queue, <<"queue name">>}, rabbit_amqqueue:internal_delete(Q, <<"CLI">>).'

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.

Saurabh Gupta

unread,
Jul 6, 2018, 1:12:41 PM7/6/18
to rabbitmq-users
This worked, Thanks!

Saurabh

Pavel Lebedev

unread,
Jul 10, 2019, 4:00:47 AM7/10/19
to rabbitmq-users
This worked for me also.
Thank you!
Reply all
Reply to author
Forward
0 new messages