Hi,
I'm trying to create a RabbitMQ cluster between two CentOS VM's running in VMware fusion in my mac. I'm using rabbitmq 3.4.2 generic unix installer and erlang monolithic rpm from RabbitMQ website.
In /etc/hosts of my mac, I named the ip of VM's as rabbitos (primary VM) and rabbitos1 (secondary VM). I also make sure that erlang cookies in both VM's are same (in the file ~/.erlang.cookie). Then my steps are:
In primary VM:
1. Started rabbitmq server in primary VM.
In secondary VM:
2. Started rabbitmq server.
3. rabbitmqctl stop_app
4. rabbitmqctl join_cluster rabbit@rabitos
Output:
Clustering node rabbit@localhost with rabbit@rabitos ...
Error: unable to connect to nodes [rabbit@rabitos]: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@rabitos]
rabbit@rabitos:
* connected to epmd (port 4369) on rabitos
* epmd reports node 'rabbit' running on port 65535
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
current node details:
- node name: 'rabbitmqctl-49252@localhost'
- home dir: /home/sshahid
- cookie hash: Te63nRpH3ub75f5EhwzyQQ==
5. I got the same output if I run the same command with IP address:
But these two extra lines in the log:
** System NOT running to use fully qualified hostnames **
** Hostname 192.168.177.157 is illegal **
So I did few Google searches and found that same cookie is essential which I already fulfilled. The second hint here [1] is to open one more ports in firewall other than 4369 and 25672. So I used the following rabbitmq.config in both VM's and made sure port 65535 is open along with 4369 and 25672 (tested the ports with telnet):
[
{kernel,
[{inet_dist_listen_min, 65535},
{inet_dist_listen_max, 65535}
]
}
].
But I got the exact same result as above. So would appreciate if anyone can comment what is going wrong here.
Thanks.
Shahid