RabbitMQ - Resolve "Parameter does not exist" when attempting to delete a terminated shovel

Let's say Parameter does not exist is being returned when attempting to delete a shovel using the rabbitmqctl delete_shovel command.

~]# rabbitmqctl delete_shovel --vhost foo shovel001
Deleting shovel shovel001 in vhost foo
{{:badmatch, {:error_string, 'Parameter does not exist'}}, [{:rabbit_shovel_util, :delete_shovel, 3, [file: 'src/rabbit_shovel_util.erl', line: 44]}]}


The rabbitmqctl list_parameters command can be used to confirm that the parameter does not exist. In this example, there are no parameters, which is why the delete_shovel command is returning "parameter does not exist".

~]# rabbitmqctl list_parameters --vhost foo
Listing runtime parameters for vhost "foo" ...


However, let's say the rabbitmqctl shovel_status command lists the shovel. Most likely, the shovel will be in a terminated state.

~]# rabbitmqctl shovel_status --formatter json | python -m json.tool
        "destination": "",
        "last_changed": "2022-02-03 14:36:26",
        "name": "shovel001",
        "source": "",
        "state": "terminated",
        "termination_reason": "\"needed a restart\"",
        "type": "dynamic",
        "vhost": "foo"


In this scenario, restarting the RabbitMQ server should remove the terminated shovel. However, it is not ideal to have to restart the entire RabbitMQ server. Another option is to use the rabbitmq-plugins disable command to disable the rabbitmq_shovel and rabbitmq_shovel_management plugins.


Be aware that disabling the rabbitmq_shovel and rabbitmq_shovel_management plugins will remove every shovel running on the RabbitMQ node. You may want to log the running shovels so that the shovels can be recreated after the plugins have been disabled and then enabled.

rabbitmq-plugins disable rabbitmq_shovel


And to then use the rabbitmq-plugins enable command to enable the rabbitmq_shovel and rabbitmq_shovel_management plugins.

rabbitmq-plugins disable rabbitmq_shovel


After the plugins have been disabled and then enabled, there should be no shovels running on the RabbitMQ node, which you can confirm using the rabbitmqctl shovel_status command.

~]# rabbitmqctl shovel_status --formatter json | python -m json.tool


You can now use the rabbitmqctl set_parameter command to recreate the shovels that were removed.


Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 0b60f in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |