Reputation: 2670
I have installed rabbitmq in two machines.And they all worked well.
Then I run the command:rabbitmqctl join_cluster --ram rabbit@rabbit1
, it's not work.And the error info:
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==
I searched it in google, and I had modified my /etc/hosts file:
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
And the .erlang.cookie I made them the same.
Upvotes: 1
Views: 2654
Reputation: 2670
I just solved this problem by restart my os when I modified the /etc/hosts.And finally it worked, I guess it would be the /etc/hosts not taking effect.
Upvotes: 1