RabbitMQ集群I4

2022-05-04 21:31:51 浏览数 (1)

查看集群状态

代码语言:javascript复制
[root@h101 ~]# rabbitmqctl  cluster_status
Cluster status of node rabbit@h101 ...
[{nodes,[{disc,[rabbit@h101]}]},
 {running_nodes,[rabbit@h101]},
 {cluster_name,<<"rabbit@h101.temp">>},
 {partitions,[]}]
[root@h101 ~]# 
[root@h102 ~]# rabbitmqctl  cluster_status
Cluster status of node rabbit@h102 ...
[{nodes,[{disc,[rabbit@h102]}]},
 {running_nodes,[rabbit@h102]},
 {cluster_name,<<"rabbit@h102.temp">>},
 {partitions,[]}]
[root@h102 ~]# 

创建集群

首先关掉本地应用 rabbitmqctl stop_app

代码语言:javascript复制
[root@h102 ~]# /etc/init.d/rabbitmq-server stop 
Stopping rabbitmq-server: RabbitMQ is not running
rabbitmq-server.
[root@h102 ~]# /etc/init.d/rabbitmq-server start 
Starting rabbitmq-server: SUCCESS
rabbitmq-server.
[root@h102 ~]# rabbitmqctl  stop_app
Stopping node rabbit@h102 ...
[root@h102 ~]# rabbitmqctl  status
Status of node rabbit@h102 ...
[{pid,16425},
 {running_applications,[{xmerl,"XML parser","1.2.10"},
                        {sasl,"SASL  CXC 138 11","2.1.10"},
                        {stdlib,"ERTS  CXC 138 10","1.17.5"},
                        {kernel,"ERTS  CXC 138 10","2.14.5"}]},
 {os,{unix,linux}},
 {erlang_version,"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:64] [kernel-poll:true]n"},
 {memory,[{total,27691920},
          {connection_readers,0},
          {connection_writers,0},
          {connection_channels,0},
          {connection_other,0},
          {queue_procs,0},
          {queue_slave_procs,0},
          {plugins,0},
          {other_proc,9143408},
          {mnesia,0},
          {mgmt_db,0},
          {msg_index,0},
          {other_ets,643384},
          {binary,4672},
          {code,14756074},
          {atom,1366585},
          {other_system,1777797}]},
 {alarms,[]},
 {listeners,[]},
 {processes,[{limit,1048576},{used,46}]},
 {run_queue,0},
 {uptime,21}]
[root@h102 ~]# 

0 人点赞