I am trying to do clustering with RabbitMQ. I have added two nodes, but I am unable to add a third one. I have clustered rabbit@node1 and rabbit@node2. Now I am trying to cluster rabbit@node3 with rabbit@node1.
Here is what I am trying to do:
rabbitmqctl join_cluster rabbit@node1
Clustering node rabbit@node3 with rabbit@node1 ...
Error: mnesia_not_running
Is there any way to add a third node to the cluster? Or any solution for the Error: mnesia_not_running error?
When joining a cluster, the target node application should be started, while the source (current) node application should be stopped. An application can be stopped and started with rabbitmqctl stop_app and rabbitmqctl start_app.
Maybe you have stopped the application on rabbit@node1, while joining it to the cluster. In that case you should run rabbitmqctl start_app on rabbit@node1, or rabbitmqctl -n rabbit@node1 start_app to be able to join its cluster. Or you can join the rabbit@node2 cluster and start the app later.
To have a working cluster you should start the application on all nodes after joining.
The error happens when the target node's app is stopped. When joining a node to a RabbitMQ cluster, only the source node (the node which you are trying to link) should be stopped.
On the master node:
rabbitmqctl start_app
On the current node:
rabbitmqctl stop_app
rabbitmqctl join_cluster rabbit@node1
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