RabbitMQ Error: unable to connect to nodes : nodedown
<p>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 <code>empd -names</code>, i get it is up and running on 4369.When i am use the command as <code>sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36</code> i am getting the below error ensuring as well to i am stop_app first..</p>

<pre><code>sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36
</code></pre>

<p>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</p>

<h1>DIAGNOSTICS</h1>

<p>attempted to contact: ['rabbit@ip-10-23-209-142']</p>

<p>rabbit@ip-10-23-209-142:
  * unable to connect to epmd (port 4369) on ip-10-23-209-142: nxdomain (non-existing domain)</p>

<p>current node details:
- node name: 'rabbitmq-cli-80@ip-10-23-20-36'
- home dir: /var/lib/rabbitmq
- cookie hash: u7nRIpJ40Fd356iLbkDO6Q==</p>

<p>Things I already tried: </p>

<ol>
<li>Checked the cookie name,which is same in both instances using<br>
     <code>sudo cat /var/lib/rabbitmq/.erlang.cookie</code>. </li>
<li>Changed the epmd port as well <code>export  ERL_EMPD_PORT=4370</code> </li>
<li><code>netstat -an |grep 4369 | grep -i listen</code> </li>
<li>Changing the hostnames as well in GUI of plugin management.</li>
<li><p>Changed owner and permission also using </p>

<pre><code>sudo chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
sudo chmod 400 /var/lib/rabbitmq/.erlang.cookie
</code></pre></li>
<li><p>Add port </p>

<pre><code>sudo iptables -I INPUT -p tcp --dport 4369 --syn -j ACCEPT
</code></pre></li>
<li><p>sudo rabbitmqctl status </p>

<pre><code>{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
</code></pre></li>
</ol>

<p>*IP-Adresses are sample adrresses.</p>