我已经在两台机器上安装了rabbitmq。它们都运行良好。
然后我运行命令:rabbitmqctl join_cluster --ram rabbit@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==
我在谷歌搜索过,我修改了我的/ 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我也是这样。
答案 0 :(得分:1)
我刚刚修改了/etc/hosts时重新启动了我的操作系统解决了这个问题。最后它工作了,我想这将是/ etc / hosts没有生效。