5

I have deleted node with following commands:

rabbitmqctl -n mynode@hostname stop_app
rabbitmqctl stop_app;
rabbitmqctl -n mynode@hostname reset
rabbitmqctl start_app;

And when I check in cluster, node is not there anymore:

rabbitmqctl cluster_status

Problem is that when I check status of reseted node, node is still there:

rabbitmqctl -n mynode@G2dev2 status

So my question is how to delete node permanently?

No info about that on man page: https://www.rabbitmq.com/man/rabbitmqctl.1.man.html

Thank you

iWizard
  • 398
  • 2
  • 10
  • 26
  • this is command: rabbitmqctl -n mynode@hostname shutdown – iWizard Sep 13 '17 at 09:53
  • should I put this as answer or delete question? – iWizard Sep 13 '17 at 09:53
  • So I tested this `rabbitmqctl stop_app && rabbitmqctl reset && rabbitmqctl start_app` and it was enough for me.. checked cluster status on other nodes and it was gone. Using rabbit 3.7.3 Erlang 20.2.3 – radtek Apr 20 '18 at 21:36

2 Answers2

8

You can use rabbitmqctl forget_cluster_node command to remove a node from cluster.

Artem
  • 96
  • 1
  • 2
7

You first must stop the node you wish to remove:

rabbitmqctl -n rabbit@node3 stop_app

Then from one of the other nodes you can then use the forget_cluster_node command:

rabbitmqctl forget_cluster_node rabbit@node3

Here are the details about that command: https://www.rabbitmq.com/rabbitmqctl.8.html#forget_cluster_node

Dbl0McJim
  • 81
  • 1
  • 5