rabbitmq群集无法连接到节点
我已经在两台机器上安装了rabbitmq。它们都工作得很好。 然后运行命令:rabbitmq群集无法连接到节点,rabbitmq,Rabbitmq,我已经在两台机器上安装了rabbitmq。它们都工作得很好。 然后运行命令:rabbitmqctl join\u cluster--ramrabbit@rabbit1,它不起作用。错误信息: Error: unable to connect to nodes [rabbit@rabbit1]: nodedown DIAGNOSTICS =========== attempted to contact: [rabbit@rabbit1] rabbit@rabbit1: * connected
rabbitmqctl join\u cluster--ramrabbit@rabbit1
,它不起作用。错误信息:
Error: unable to connect to nodes [rabbit@rabbit1]: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@rabbit1]
rabbit@rabbit1:
* connected to epmd (port 4369) on rabbit1
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* Hostname mismatch: node "rabbit@localhost" believes its host is different.
Please ensure that hostnames resolve the same way locally and on
"rabbit@localhost"
current node details:
- node name: 'rabbitmq-cli-66@localhost'
- home dir: /var/lib/rabbitmq
- cookie hash: 9z8msPdTpEUf5GeMrHGIqQ==
我在google中搜索了它,并修改了我的/etc/hosts文件:
127.0.0.1 rabbit2 localhost localhost.localdomain localhost4
localhost4.localdomain4
::1 rabbit2 localhost localhost.localdomain localhost6
localhost6.localdomain6
11.168.1.232 rabbit1
11.168.1.172 rabbit2
而我制作的.erlang.cookie也是一样的。当我修改/etc/hosts时,我只是通过重新启动操作系统解决了这个问题。最后它成功了,我想是/etc/hosts没有生效。可能是防火墙?不,我通过重新启动操作系统解决了这个问题。