Francesco,<br><br>Thanks again for the valuable insight from your reply. I&#39;m down to one issue at this point.<br><br>Given what you said earlier about it being OK to start the brokers in any order, I wrote a simple &quot;catastrophic stress&quot; test. The good news is that RabbitMQ does what&#39;s expected. The bad news: Only most of the time, i.e. about 90%.<br>
<br>Here&#39;s what the test does:<br><br>In a loop (5 times):<br>� � Write 5 messages to a queue comprised of 3 clustered nodes (disk based).<br>� � Kill all RabbitMQ&#39;s as quickly as possible - I use &quot;killall beam.smp&quot; invoked on all nodes simultaneously via Capistrano.<br>
� � Restart all nodes in parallel (again, using Capistrano).<br>� � Verify that each previously written message can be received.<br><br>~90% of the time, an iteration runs to completion as expected. About 10% of the time, one of the nodes fails to start,<br>
getting stuck with the last line being &quot;starting database ...&quot;<br><br>I see nothing of note in the rabbit@&lt;node&gt;.log file.<br><br>When this happens, I have no luck getting the node to join the cluster. Even attempting a &quot;rabbitmqctl force_reset&quot; hangs. The only way I can get the cluster fully formed again is to terminate all the nodes, then bring them back up. (A reset is not required in this case, however.)<br>
<br>For what it&#39;s worth, the broker start logic looks like this<br>��� nohup rabbitmq-server &amp;<br>��� rabbitmqctl wait &lt;pidfile&gt;<br><br>Are their any trace options or other places to look to understand why a node gets stuck on &quot;creating database...&quot; ?<br>
<br>This bit of startup unpredictability is causing a lot of concern with our VP. I&#39;ve been tasked with coming up with the complete story, and workarounds to any problems like this.<br><br>Thanks very much again,<br><br>
Matt<br><br><div class="gmail_quote">On Tue, Jun 19, 2012 at 1:49 AM, Francesco Mazzoli <span dir="ltr">&lt;<a href="mailto:francesco@rabbitmq.com" target="_blank">francesco@rabbitmq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Matt,<br>
<br>
At Mon, 18 Jun 2012 11:16:40 -0700,<br>
<div class="im">Matt Pietrek wrote:<br>
&gt;<br>
&gt; Francesco,<br>
&gt;<br>
&gt; Thanks very much for the detailed reply. It was extremely helpful.<br>
<br>
</div>Glad I could help.<br>
<br>
&gt; Question 1<br>
&gt; ----------------<br>
<div class="im">&gt; I stumbled across this in my own previous experimentation. The<br>
&gt; question is, do I risk message loss by first starting a node that<br>
&gt; joined the cluster late, thus not having the full set of messages that<br>
&gt; other nodes have?<br>
<br>
</div>No.<br>
<div class="im"><br>
&gt; Question 2<br>
&gt; ---------------<br>
&gt; Related to the above scenario, is there any danger (after an unplanned<br>
&gt; shutdown), in simply letting all the nodes start in parallel and<br>
&gt; letting Mnesia&#39;s waiting sort out the order? It seems to work OK in my<br>
&gt; limited testing so far, but I don&#39;t know if we&#39;re risking data loss.<br>
<br>
</div>It should be fine, but in general it&#39;s better to do cluster operations<br>
sequentially and at one site. In this specific case it should be OK.<br>
<div class="im"><br>
&gt; Question 3<br>
&gt; ---------------<br>
&gt; You said:<br>
&gt;<br>
&gt; &gt; In other words, it&#39;s up to you to restart them so that the node with the most up-to-date mnesia is started first<br>
&gt;<br>
&gt; Is there any information recorded somewhere (e.g. the logs), which<br>
&gt; would indicate which node has the &quot;most up to date&quot; Mnesia database? I<br>
&gt; see messages like:<br>
&gt;<br>
&gt; �&gt; Mirrored-queue (queue &#39;charon&#39; in vhost &#39;/&#39;): Promoting slave<br>
&gt; &lt;rabbit@play2.1.273.0&gt; to master<br>
&gt;<br>
&gt; But don&#39;t know if they&#39;re necessarily correlated to who the most<br>
&gt; up-to-date Mnesia is.<br>
<br>
</div>Well, the fact that something got promoted to master tells you that<br>
the previous master definitely went down before the promoted node.<br>
<br>
There won&#39;t be precise information if you stop the nodes abruptly, but<br>
you can look at &quot;rabbit on node &lt;node&gt; down&quot; messages in the logs -<br>
the node in the clusters are linked in distributed Erlang and these<br>
messages are generated when a node receives a &#39;DOWN&#39; message from<br>
another node. Since they are &quot;info&quot; messages, you need to make sure to<br>
have those enabled - they are enabled by default but a lot of people<br>
don&#39;t like them.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Francesco.<br>
</font></span></blockquote></div><br>