<div dir="ltr">An update:<div><br></div><div style>If I delete the database <i>and</i>�insert a 30-second sleep after the server starts in the script, then it seems to work reliably. �Hurray!</div><div style><br></div><div style>
It&#39;s worth noting, however, that if I remove the 30-second sleep (so it immediately goes to stop_app/reset/start_app), then it can corrupt the database on subsequent runs. �Once corrupted, it seems there is no way to recover but delete the mnesia database. �So something in stop_app, reset, or start_app seems to be destructive to a still-initializing RabbitMQ server.</div>
<div style><br></div><div style>Thanks again for the help! �I had tried the sleep before-- but I guess it wasn&#39;t long enough.</div><div style><br></div><div style>-Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jan 23, 2013 at 7:53 AM, Chris <span dir="ltr">&lt;<a href="mailto:stuff@moesel.net" target="_blank">stuff@moesel.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thank you, Tim and Matthias.<div><br></div><div>Tim: Yes, I&#39;m aware that many of these things can use rabbitmqctl instead of HTTP API. �I had started switching things to HTTP API (so, in theory, if I ever need to put my own GUI on these commands, I&#39;ll know the calls)-- but didn&#39;t get through it all yet. �In hindsight, maybe I should stick with rabbitmqctl for now so I can more easily see what is going on. �Thanks for making me think about it.<br>

</div><div><br></div><div>Regarding the startup of servers, that&#39;s a good point and something I had thought of. �While troubleshooting, I inserted a &quot;sleep 2&quot; after the rabbit startups to give them a couple of seconds to sleep. �I don&#39;t think I can use &quot;rabbitmqctl wait &lt;pid_file&gt;&quot; because when I start the servers in detached mode it specifically says: &quot;Warning: PID file not written; -detached was passed.&quot; �I tried &quot;rabbitmqctl -n rabbita wait&quot;, but get back an error saying it is an invalid command. �I guess I will experiment with &quot;sleep&quot; again, but use a value greater than 2 seconds.</div>

<div><br></div><div>Matthias: After deleting the mnesia database I tried multiple times to get the node up. �Maybe there was a different error the first time, but I noted the error from subsequent times. �I&#39;ll try from scratch again and see what happens.<br>

</div><div><br></div><div>Thanks again-- I really appreciate the pointers.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Chris</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jan 23, 2013 at 4:57 AM, Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@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"><div>On 23/01/13 09:36, Tim Watson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Where do you set<br>
the RABBITMQ_MNESIA_BASE and/or RABBITMQ_MNESIA_DIR for the individual<br>
nodes?<br>
</blockquote>
<br></div>
The script supplies a RABBITMQ_NODENAME, which is sufficient.<br>
<br>
Btw, as an aside, I notice that the script employs a mixture of rabbitmqctl and management API access. The latter for creating vhosts, granting user permissions, setting up queue mirroring policies and federated exchanges. All but the last one can be done with rabbitmqctl.<div>

<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you confirm the database directory deletion by running `ls -la`<br>
afterwards to make sure everything&#39;s gone, and then try starting up a<br>
single node.<br>
</blockquote>
<br></div>
Indeed.<br>
<br>
One problem with the scripts is that the servers are started asynchronously, with -detached, so they may not have fully started by the time the subsequent rabbitmqctl invocations try to talk to them. A judicious insertion of &#39;rabbitmqctl wait &lt;pid_file&gt;&#39; should solve that.<br>


<br>
Regards,<br>
<br>
Matthias.<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>