I am trying to perform clustering using two instances of Rhel. I can ping each other, and even when I try to use the command empd -names, I get that it is running and running on 4369. When I use the command as sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36, I get the following error, First I stop.
sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36
Clustering node 'rabbit @ ip-10-23-20-36' with 'rabbit @ ip-10-23-209-142' ... Error: cannot connect to nodes ['rabbit @ ip-10-23-209- 142 ']: nodedown
DIAGNOSTICS
tried to contact: ['rabbit @ ip-10-23-209-142']
rabbit @ f-10-23-209-142: * cannot connect to epmd (port 4369) on ip-10-23-209-142: nxdomain (non-existent domain)
current node information: - node name: 'rabbitmq-cli-80 @ ip-10-23-20-36' - home dir: / var / lib / rabbitmq - cookie hash: u7nRIpJ40Fd356iLbkDO6Q ==
Things I've already tried:
- Checked cookie name, which is the same in both cases using
sudo cat /var/lib/rabbitmq/.erlang.cookie. - Also changed epmd port
export ERL_EMPD_PORT=4370 netstat -an |grep 4369 | grep -i listen- Change host names, as well as in the plugin management GUI.
The changed owner and permission also use
sudo chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
sudo chmod 400 /var/lib/rabbitmq/.erlang.cookie
Add port
sudo iptables -I INPUT -p tcp --dport 4369 --syn -j ACCEPT
sudo rabbitmqctl status
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
* IP Addresses are exemplary addresses.
source
share