I run RabbitMQ on 3 servers, same version of Erlang and RabbitMQ: RabbitMQ 3.4.1, Erlang 17.3
One node crashed on server 2. The two other nodes did not connect together:
server 1:
[CentOS-62-64-minimal ~]$ sudo rabbitmqctl cluster_status
Cluster status of node 'rabbit@CentOS-62-64-minimal' ...
[{nodes,[{disc,['rabbit@CentOS-62-64-minimal',rabbit@de3,rabbit@mysql]}]},
{running_nodes,['rabbit@CentOS-62-64-minimal']},
{cluster_name,<<"rabbit@CentOS-62-64-minimal">>},
{partitions,[]}]
server 3:
[de3 ~]$ sudo rabbitmqctl cluster_status
Cluster status of node rabbit@de3 ...
[{nodes,[{disc,['rabbit@CentOS-62-64-minimal',rabbit@de3,rabbit@mysql]}]},
{running_nodes,[rabbit@de3]},
{cluster_name,<<"rabbit@CentOS-62-64-minimal">>},
{partitions,[]}]
After restarting and resetting rabbitmq on server 3, it finally connected to server1:
[CentOS-62-64-minimal ~]$ sudo rabbitmqctl cluster_status
Cluster status of node 'rabbit@CentOS-62-64-minimal' ...
[{nodes,[{disc,['rabbit@CentOS-62-64-minimal',rabbit@de3,rabbit@mysql]}]},
{running_nodes,['rabbit@CentOS-62-64-minimal']},
{cluster_name,<<"rabbit@CentOS-62-64-minimal">>},
{partitions,[]}]
Why did the cluster "break" with just 1 node down? server 3 was working fine, but server 1 was not: "Queue is located on a server that is down".
As for server 2, it did not restart. After a manual restart, I cannot make it reconnect to the cluster, even after multiple reset and removing /var/lib/rabbitmq/mnesia/:
[root@mysql ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@mysql ...
[{nodes,[{disc,[rabbit@mysql]}]},
{running_nodes,[rabbit@mysql]},
{cluster_name,<<"[email protected]">>},
{partitions,[]}]
[mysql ~]# rabbitmqctl stop_app
Stopping node rabbit@mysql ...
[root@mysql ~]# rabbitmqctl force_reset
Forcefully resetting node rabbit@mysql ...
[ysql ~]# rabbitmqctl join_cluster rabbit@CentOS-62-64-minimal
Clustering node rabbit@mysql with 'rabbit@CentOS-62-64-minimal' ...
Error: {ok,already_member}
[mysql ~]# rabbitmqctl start_app
Starting node rabbit@mysql ...
[mysql ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@mysql ...
[{nodes,[{disc,[rabbit@mysql]}]},
{running_nodes,[rabbit@mysql]},
{cluster_name,<<"[email protected]">>},
{partitions,[]}]
I have no idea what went wrong. Last time this happened, I upgraded RabbitMQ qnd Erlang to the latest version.