加入集群 rabbitmqctl join_cluster rabbit@h101
代码语言:javascript复制[root@h102 ~]# rabbitmqctl join_cluster rabbit@h101
Clustering node rabbit@h102 with rabbit@h101 ...
[root@h102 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@h102 ...
[{nodes,[{disc,[rabbit@h101,rabbit@h102]}]}]
[root@h101 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@h101 ...
[{nodes,[{disc,[rabbit@h101,rabbit@h102]}]},
{running_nodes,[rabbit@h101]},
{cluster_name,<<"rabbit@h101.temp">>},
{partitions,[]}]
[root@h101 ~]#
启动应用 rabbitmqctl start_app
代码语言:javascript复制[root@h102 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@h102 ...
[{nodes,[{disc,[rabbit@h101,rabbit@h102]}]}]
[root@h102 ~]# rabbitmqctl start_app
Starting node rabbit@h102 ...
[root@h102 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@h102 ...
[{nodes,[{disc,[rabbit@h101,rabbit@h102]}]},
{running_nodes,[rabbit@h101,rabbit@h102]},
{cluster_name,<<"rabbit@h101.temp">>},
{partitions,[]}]
[root@h102 ~]#
[root@h101 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@h101 ...
[{nodes,[{disc,[rabbit@h101,rabbit@h102]}]},
{running_nodes,[rabbit@h102,rabbit@h101]},
{cluster_name,<<"rabbit@h101.temp">>},
{partitions,[]}]
[root@h101 ~]#