rabbitmq在docker下进行cluster

hosts 与 hostname 所有节点保持一致,因为互为主从,因此需要通信
核心:配置一致cookie
1.
cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.200.7.4 mq4
172.200.7.2 mq2

cat /etc/hostname
mq4
mq2

rabbitmqctl stop_app && rabbitmqctl reset && rabbitmqctl join_cluster --ram rabbit@mq2 && rabbitmqctl start_app

posted on 2021-05-03 12:09  木林coder  阅读(124)  评论(0编辑  收藏  举报

导航