1,执行在host文件中配置主名字
192.168.1.21 <span style="font-family: Arial, Helvetica, sans-serif;">platform-api1</span> 192.168.1.22 <span style="font-family: Arial, Helvetica, sans-serif;">platform-api2</span>
3,,将集群的cooke设置一直,在21上执行下面的命令,将内容copy到22上
sudo vi /var/lib/rabbitmq/.erlang.cookie
4,执行命令
rabbitmqctl join_cluster rabbit@platform-api1看到一下结果则创建成功
Cluster status of node 'rabbit@platform-api2' ... [{nodes,[{disc,['rabbit@platform-api1','rabbit@platform-api2']}]}] ...done.
Rabbit - Error: mnesia_unexpectedly_running则执行下面的命令即可:
rabbitmqctl stop_app rabbitmqctl reset rabbitmqctl cluster rabbit@platform-api2
Ubuntu 下 rabbitmq集群配置,布布扣,bubuko.com
原文地址:http://blog.csdn.net/joeyon1985/article/details/38728089