3

I am trying to do clustering on RABBITMQ. I have added 2 nodes but unable to add 3rd 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 solution that how to add a third node in cluster? Or any solution for the Error: mnesia_not_running

Ali Warrich
  • 129
  • 2
  • 6

2 Answers2

7

When joining cluster, target node application should be started, while source (current) node application should be stopped. Application stopped and started with rabbitmqctl stop_app/rabbitmqctl start_app.

Maybe you have stopped application on rabbit@node1, while joining it to cluster, in that case you should to run rabbitmqctl start_app on rabbit@node1, or rabbitmqctl -n rabbit@node1 start_app to be able to join it's cluster. Or you can join rabbit@node2 cluster and start app later. To have working cluster you should start application on all nodes after joining.

Daniil Fedotov
  • 371
  • 1
  • 2
  • Thats really helpful. But I also sorted it our earlier. The problem was On **Node3** I was performing three steps .....first `stop app` , `reset app` and then I was trying to join. Where as I shouldn't reset app/ I only need to **stop** , **join** and **start**. And all set :) – Ali Warrich Mar 21 '16 at 05:33
1

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

master node: rabbitmqctl start_app

on the current node: rabbitmqctl stop_app rabbitmqctl join_cluster rabbit@node1