前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >RabbitMQ集群I10

RabbitMQ集群I10

作者头像
franket
发布2022-05-04 22:00:36
1210
发布2022-05-04 22:00:36
举报
文章被收录于专栏:技术杂记

拆分集群

本地退出

有时我们有必要从集群中移出某个node,分三步

  • 1 停应用
  • 2 重置node
  • 3 起应用
代码语言:javascript
复制
[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 ~]# rabbitmqctl stop_app 
Stopping node rabbit@h102 ...
[root@h102 ~]# rabbitmqctl reset
Resetting node 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@h102]}]},
 {running_nodes,[rabbit@h102]},
 {cluster_name,<<"rabbit@h102.temp">>},
 {partitions,[]}]
[root@h102 ~]# 

h101上的集群状态

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

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 拆分集群
    • 本地退出
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档