1. 程式人生 > >rabbitmq叢集報錯

rabbitmq叢集報錯

Hostname mismatch: node "[email protected]" believes its host is different. Please ensure that hostnames resolve the same way locally and on "[email protected]"

修改 /etc/hosts
兩臺機新增
192.168.74.142 node1
192.168.74.179 node2

修改/etc/hostname
192.168.74.142 修改為 node1
192.168.74.179 修改為 node2

》export HOSTNAME=node1
》export HOSTNAME=node2

192.168.74.142啟動命令

RABBITMQ_NODENAME=rabbimq1 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15672}]" rabbitmq-server -detached

192.168.74.179啟動命令

RABBITMQ_NODENAME=rabbimq2 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15672}]" rabbitmq-server -detached

注意 :RABBITMQ_NODENAME不能寫成node1和node2