Adding node to cluster always fails

2,093 views
Skip to first unread message

hauke...@celexongroup.com

unread,
Mar 22, 2017, 8:59:08 AM3/22/17
to rabbitmq-users
Hi all!

I had to set up a new node for our cluster and the problem is, that I cannot add the node to the cluster. Searching the web gave me no solution :-/

On a fresh installed server, i do this with the following results:
root@rabbitmq:/var/lib/rabbitmq/mnesia# /etc/init.d/rabbitmq-server start
Starting rabbitmq-server (via systemctl): rabbitmq-server.service.
root@rabbitmq:/var/lib/rabbitmq/mnesia# rabbitmqctl join_cluster 'rabbit@rabb
itmq-ha'
Clustering node rabbit@RabbitMQ with 'rabbit@rabbitmq-ha' ...
Error:  Mnesia is still running on node rabbit@RabbitMQ.
       Please stop the node with rabbitmqctl stop_app first.
root@rabbitmq:/var/lib/rabbitmq/mnesia# rabbitmqctl stop_app                  
Stopping rabbit application on node rabbit@RabbitMQ ...
root@rabbitmq:/var/lib/rabbitmq/mnesia# rabbitmqctl join_cluster 'rabbit@rabb
itmq-ha'
Clustering node rabbit@RabbitMQ with 'rabbit@rabbitmq-ha' ...
Error: {inconsistent_cluster,"Node 'rabbit@rabbitmq-ha' thinks it's clustered
with node rabbit@RabbitMQ, but rabbit@RabbitMQ disagrees"}
root@rabbitmq:/var/lib/rabbitmq/mnesia#




Any help is appreciated!


Thanks and kind regards,
Hauke

Michael Klishin

unread,
Mar 22, 2017, 9:03:27 AM3/22/17
to rabbitm...@googlegroups.com
There is a hint right in the error message:

> Mnesia is still running on node rabbit@RabbitMQ. 
> Please stop the node with rabbitmqctl stop_app first.

As mentioned in the clustering guide transcript, to add a cluster node using rabbitmqctl you must first reset the node and then stop RabbitMQ on it, then cluster.
--
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.

hauke...@celexongroup.com

unread,
Mar 22, 2017, 9:08:57 AM3/22/17
to rabbitmq-users
Yes and I stopped the app, as you also might noticed ;)

Then, I tried to join_cluster and failed.

The most important message is:
 Error: {inconsistent_cluster,"Node 'rabbit@rabbitmq-ha' thinks it's clustered
with node rabbit@RabbitMQ, but rabbit@RabbitMQ disagrees"}


Another notice:
It is not possible to do a rest on all the nodes, because the remaining node is in use :-/


Best,
Hauke

Michael Klishin

unread,
Mar 22, 2017, 9:49:52 AM3/22/17
to rabbitm...@googlegroups.com
The node you want to join another cluster must be reset, see

If node A was clustered with B but then B was reset, if A is restarted it will try to
contact B. B won't recognise A as a cluster member that point unless A is reset
(which deletes all of its data). Alternatively you can force A to boot without
waiting for B using `rabbitmqctl force_boot`:

New (reset and stopped (with stop_app)) nodes can join existing clusters, not the other
way around.


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

hauke...@celexongroup.com

unread,
Mar 22, 2017, 10:01:25 AM3/22/17
to rabbitmq-users
Okay, thanks for that information.

I reinstalled the whole thing b/c that way it was easier to setup the cluster.
The old setup was completely broken. Yes, the remaining node I was using, was not able to be the master and accept another node.

Now everything is fine!


Thanks and kind regards,
Hauke


Am Mittwoch, 22. März 2017 14:49:52 UTC+1 schrieb Michael Klishin:
The node you want to join another cluster must be reset, see

If node A was clustered with B but then B was reset, if A is restarted it will try to
contact B. B won't recognise A as a cluster member that point unless A is reset
(which deletes all of its data). Alternatively you can force A to boot without
waiting for B using `rabbitmqctl force_boot`:

New (reset and stopped (with stop_app)) nodes can join existing clusters, not the other
way around.

On Wed, Mar 22, 2017 at 4:08 PM, <hauke...@celexongroup.com> wrote:
Yes and I stopped the app, as you also might noticed ;)

Then, I tried to join_cluster and failed.

The most important message is:
 Error: {inconsistent_cluster,"Node 'rabbit@rabbitmq-ha' thinks it's clustered
with node rabbit@RabbitMQ, but rabbit@RabbitMQ disagrees"}


Another notice:
It is not possible to do a rest on all the nodes, because the remaining node is in use :-/


Best,
Hauke

--
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,
Mar 22, 2017, 10:47:32 AM3/22/17
to rabbitm...@googlegroups.com
Minor nitpick: there are no master and mirror nodes in RabbitMQ. Queues have a master
and mirrors but nodes are peers (they are equal).

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.
Reply all
Reply to author
Forward
0 new messages