<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Wingdings}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.hoenzb
        {}
span.EmailStyle18
        {font-family:"Arial","sans-serif";
        color:navy}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
ol
        {margin-bottom:0cm}
ul
        {margin-bottom:0cm}
-->
</style>
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">Hi,</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">In my case, I have a 2 node cluster (called cache1 and cache2) and I needed to add an entry to the hosts file on both nodes to ensure each node can resolve the
 name of the other node before clustering worked for me.</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">My hosts file is in /etc and is called hosts</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">In there I entered the following:</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">On cache1.lon.hosting, enter the line 192.168.3.1 Cache2.domain.com Cache2</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">On cache2.lon.hosting, enter the line 192.168.3.0 Cache1.domain.com Cache1</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">Once done, I needed to confirm I could ping each node using it&#8217;s hostname from the other node. I don&#8217;t care about DNS or nslookup working/resolving the name.</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">HTH</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">Robin</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:navy">&nbsp;</span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt; font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rabbitmq-discuss-bounces@lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com]
<b>On Behalf Of </b>Derek Wyatt<br>
<b>Sent:</b> 25 September 2013 15:47<br>
<b>To:</b> Discussions about RabbitMQ<br>
<b>Subject:</b> Re: [rabbitmq-discuss] Clustering - just can't get it going</span></p>
<p class="MsoNormal">&nbsp;</p>
<div>
<p class="MsoNormal">Ah, I do have more information though:</p>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">DIAGNOSTICS</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">===========</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">nodes in question: ['RMQ1']</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">hosts, their running nodes and ports:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">- unable to connect to epmd on RMQ1: nxdomain (non-existing domain)</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">current node details:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">- node name: 'rabbitmqctl1577@RMQ2'</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">- home dir: /var/lib/rabbitmq</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">- cookie hash: ohQKEF09peb6bAgNqawvKA==</span></p>
</div>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">And just to be clear, the cookie is the same:</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-family:&quot;Courier New&quot;">01</span></b><span style="font-family:&quot;Courier New&quot;">:~$ sudo md5sum /var/lib/rabbitmq/.erlang.cookie&nbsp;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">a2140a105d3da5e6fa6c080da9ac2f28 &nbsp;/var/lib/rabbitmq/.erlang.cookie</span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-family:&quot;Courier New&quot;">02</span></b><span style="font-family:&quot;Courier New&quot;">:~$ sudo md5sum /var/lib/rabbitmq/.erlang.cookie</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">a2140a105d3da5e6fa6c080da9ac2f28 &nbsp;/var/lib/rabbitmq/.erlang.cookie</span></p>
</div>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">Somehow, telnet to epmd works just fine, but something that RMQ is doing fails to make that happen. &nbsp;Is there some sort of DNS work that it's doing, instead of using the hosts files?</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">i.e. one thing I found is that nslookup fails:</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">02:~$ nslookup RMQ1</span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">;; Got SERVFAIL reply from &lt;ipaddress&gt;, trying next server</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Server:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ipaddress&gt;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Address:&nbsp; &lt;ipaddress&gt;</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">** server can't find RMQ1: SERVFAIL</span></p>
</div>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">But if I ping RMQ1 it works fine. &nbsp;<span style="font-family:&quot;Courier New&quot;">/etc/nsswitch.conf</span> specifies that files should be tried first, before DNS w.r.t. hosts.</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">So, it looks like RMQ is doing something more rigorous to resolve the host, and I don't know how to change that. &nbsp;I also don't have access to the DNS server configuration in order to modify it in any way.</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&nbsp;</p>
<div>
<p class="MsoNormal">On 25 September 2013 09:57, Jason McIntosh &lt;<a href="mailto:mcintoshj@gmail.com" target="_blank">mcintoshj@gmail.com</a>&gt; wrote:</p>
<div>
<p class="MsoNormal">Check your erlang cookie on both servers to make sure it matches I think it's in - /var/lib/rabbitmq/ - then you can use rabbitmqctl from one machine and see if you can connect to another to list queues. &nbsp;I THINK that's rabbitmqctl -n &lt;servernode&gt;
 list_queues for example. &nbsp;If both servers can talk to each other then it should be rabbitmqctl stop_app, join_cluster, start_app.<br>
<br>
Jason</p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&nbsp;</p>
<div>
<p class="MsoNormal">On Wed, Sep 25, 2013 at 8:50 AM, Derek Wyatt &lt;<a href="mailto:derek@derekwyatt.org" target="_blank">derek@derekwyatt.org</a>&gt; wrote:</p>
<div>
<p class="MsoNormal">Hi,</p>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">I've seen a number of people failing to get clustering running and, unfortunately, I can't get it going either. &nbsp;Here's the summary of what I've got:</p>
</div>
<div>
<div>
<ul type="disc">
<li class="MsoNormal" style="">Two nodes - RMQ1 and RMQ2</li><li class="MsoNormal" style="">I can ping RMQ1 from RMQ2, and vice versa</li><li class="MsoNormal" style="">I can telnet from RMQ1 to RMQ2:epmd, and vice versa</li><li class="MsoNormal" style="">I can telnet from RMQ1 to RMQ2:amqp, and vice versa</li><li class="MsoNormal" style="">The cookie file is identical, as is clear from the startup INFO</li></ul>
<div>
<p class="MsoNormal">My goal is to have RMQ2 join RMQ1 in a cluster.</p>
</div>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">The servers are started using the init script in Ubuntu (i.e. service rabbitmq-server start). &nbsp;This is different than the script at&nbsp;<a href="http://www.rabbitmq.com/clustering.html" target="_blank">http://www.rabbitmq.com/clustering.html</a>,
 which says to start with &quot;rabbitmq-server -detached&quot;. &nbsp;I've tried that and it doesn't seem to make any difference so I always use the init script instead.</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">So, the script says to stop the RMQ2 server and then join the cluster. &nbsp;The following transcript shows how well all this goes:</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">02:~$ sudo rabbitmqctl stop_app</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Stopping node 'rabbit@RMQ2' ...</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">...done.</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">02:~$ sudo rabbitmqctl join_cluster --ram rabbit@RMQ1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Clustering node 'rabbit@RMQ2' with 'rabbit@RMQ1' ...</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Error: {cannot_discover_cluster,&quot;The nodes provided are either offline or not running&quot;}</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">However, as I said above, telnetting to the ports works just fine:</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">02:~$ telnet RMQ1 epmd</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Trying &lt;ip address&gt;...</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Connected to RMQ1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Escape character is '^]'.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">booger!</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Connection closed by foreign host.</span></p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">02:~$ telnet RMQ1 amqp</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Trying &lt;ip address&gt;...</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Connected to RMQ1</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">Escape character is '^]'.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">booger!</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">AMQP Connection closed by foreign host.</span></p>
</div>
</div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">I'm stuck for what else to test. &nbsp;Does anyone know how to troubleshoot this thing further?</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<div>
<p class="MsoNormal">Thanks,</p>
</div>
<div>
<p class="MsoNormal">Derek</p>
</div>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></p>
</div>
<p class="MsoNormal"><span style="color:#888888"><br>
<br clear="all">
<span class="hoenzb"></span></span></p>
<div>
<p class="MsoNormal">&nbsp;</p>
</div>
<p class="MsoNormal"><span class="hoenzb"><span style="color:#888888">-- </span></span><span style="color:#888888"><br>
<span class="hoenzb">Jason McIntosh</span><br>
<span class="hoenzb"><a href="http://mcintosh.poetshome.com/blog/" target="_blank">http://mcintosh.poetshome.com/blog/</a></span><br>
<span class="hoenzb"><a href="tel:573-424-7612" target="_blank">573-424-7612</a> </span>
</span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></p>
</div>
<p class="MsoNormal">&nbsp;</p>
</div>
</div>
<hr>
<p>This email is from Hostelbookers.com Limited. Registered office: 52-54 High Holborn, London, WC1V 6RL, UK. Registered in England under Company No.: 2841908. This email and any files transmitted with it are confidential and may be privileged and are intended
 solely for the use of the individual or entity to whom they are addressed. As email can be subject to operational or technical difficulties and time delays, communications that are subject to deadlines should also be sent by post. Any unauthorised direct or
 indirect dissemination, distribution or copying of this message and any attachments is strictly prohibited. If you have received the email in error, please notify postmaster@hostelbookers.com</p>
<hr>
</body>
</html>