I am trying to do clustering using two Rhel instances. I am able to ping each other and even when i am trying to use command empd -names
, i get it is up and running on 4369.When i am use the command as sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36
i am getting the below error ensuring as well to i am stop_app first..
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: unable to connect to nodes ['rabbit@ip-10-23-209-142']: nodedown
DIAGNOSTICS
attempted to contact: ['rabbit@ip-10-23-209-142']
rabbit@ip-10-23-209-142: * unable to connect to epmd (port 4369) on ip-10-23-209-142: nxdomain (non-existing domain)
current node details: - node name: 'rabbitmq-cli-80@ip-10-23-20-36' - home dir: /var/lib/rabbitmq - cookie hash: u7nRIpJ40Fd356iLbkDO6Q==
Things I already tried:
- Checked the cookie name,which is same in both instances using
sudo cat /var/lib/rabbitmq/.erlang.cookie
. - Changed the epmd port as well
export ERL_EMPD_PORT=4370
netstat -an |grep 4369 | grep -i listen
- Changing the hostnames as well in GUI of plugin management.
Changed owner and permission also using
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-Adresses are sample adrresses.