Hi Simon,<div><br></div><div>Yup, I spotted that just after posting. It now reads:</div><div><br></div>...<br>rabbitmqctl -n rabbit3 stop_app<br>rabbitmqctl -n rabbit3 reset<br>rabbitmqctl -n rabbit3 cluster rabbit1@dfooks-ubuntu64 rabbit2@dfooks-ubuntu64<br>
rabbitmqctl -n rabbit3 start_app<div><br></div><div>However, after that fix I'm still seeing the same error.</div><div><br></div><div>Thanks for the tip on RABBITMQ_PID_FILE (it should be documented that it doesn't work with -detached).</div>
<div><br><div class="gmail_quote">On 4 May 2012 18:00, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 04/05/12 17:46, David Fooks wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm trying to emulate the guide here:<br>
<a href="http://www.rabbitmq.com/clustering.html" target="_blank">http://www.rabbitmq.com/<u></u>clustering.html</a><br>
<br>
But I'm having a lot of issues! Every time I run I seem to be getting a<br>
different crash. Is this feature actually supported in 2.8.1?<br>
</blockquote>
<br>
Yes! But running a cluster on a single machine is more fiddly than running it on separate machines as you need to make sure the nodes don't tread on each other. I don't think that's your problem though.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a proper way to completely reset all of the state that rabbitmq<br>
creates about other nodes/the cluster? My clean up script at the moment<br>
looks like this:<br>
<br>
rm /var/run/rabbitmq/*<br>
rm -f /var/log/rabbitmq/*<br>
rm -rf /var/lib/rabbitmq/*<br>
</blockquote>
<br>
OK, that should be fine.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here is my start-up script (I'm running this with sudo):<br>
<br>
RABBITMQ_NODE_PORT=5672 RABBITMQ_NODENAME=rabbit1<br>
RABBITMQ_SERVER_START_ARGS="-<u></u>rabbitmq_mochiweb listeners<br>
[{mgmt,[{port,55672}]}]" rabbitmq-server -detached<br>
RABBITMQ_NODE_PORT=5673 RABBITMQ_NODENAME=rabbit2<br>
RABBITMQ_SERVER_START_ARGS="-<u></u>rabbitmq_mochiweb listeners<br>
[{mgmt,[{port,55673}]}]" rabbitmq-server -detached<br>
RABBITMQ_NODE_PORT=5674 RABBITMQ_NODENAME=rabbit3<br>
RABBITMQ_SERVER_START_ARGS="-<u></u>rabbitmq_mochiweb listeners<br>
[{mgmt,[{port,55674}]}]" rabbitmq-server -detached<br>
<br>
ps -ef | grep rabbit1 | grep -v grep | awk '{print $2}' ><br>
/var/run/rabbitmq/rabbit1.pid<br>
ps -ef | grep rabbit2 | grep -v grep | awk '{print $2}' ><br>
/var/run/rabbitmq/rabbit2.pid<br>
ps -ef | grep rabbit3 | grep -v grep | awk '{print $2}' ><br>
/var/run/rabbitmq/rabbit3.pid<br>
</blockquote>
<br>
Ew, those ps'es are not nice. You may prefer to set RABBITMQ_PID_FILE for each startup, although this means you cannot use -detached (instead just background it with &)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
rabbitmqctl -n rabbit1 wait /var/run/rabbitmq/rabbit1.pid<br>
rabbitmqctl -n rabbit2 wait /var/run/rabbitmq/rabbit2.pid<br>
rabbitmqctl -n rabbit3 wait /var/run/rabbitmq/rabbit3.pid<br>
<br>
rabbitmqctl -n rabbit1 stop_app<br>
rabbitmqctl -n rabbit1 reset<br>
rabbitmqctl -n rabbit1 start_app<br>
<br>
rabbitmqctl -n rabbit2 stop_app<br>
rabbitmqctl -n rabbit2 reset<br>
rabbitmqctl -n rabbit2 start_app<br>
<br>
rabbitmqctl -n rabbit3 stop_app<br>
rabbitmqctl -n rabbit3 reset<br>
rabbitmqctl -n rabbit3 start_app<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
rabbitmqctl -n rabbit1 status<br>
rabbitmqctl -n rabbit2 status<br>
rabbitmqctl -n rabbit3 status<br>
<br>
rabbitmqctl -n rabbit3 stop_app<br>
rabbitmqctl -n rabbit3 cluster rabbit1@dfooks-ubuntu64<br>
rabbit2@dfooks-ubuntu64<br>
rabbitmqctl -n rabbit3 start_app<br>
</blockquote>
<br>
But here's the problem. You need to do:<br>
<br>
rabbitmqctl -n rabbit3 stop_app<br>
rabbitmqctl -n rabbit3 reset<br>
rabbitmqctl -n rabbit3 cluster rabbit1@dfooks-ubuntu64 \<br>
rabbit2@dfooks-ubuntu64<br>
rabbitmqctl -n rabbit3 start_app<br>
<br>
Instead you are doing something like (considering only rabbit3):<br>
<br>
rabbitmqctl -n rabbit3 stop_app<br>
rabbitmqctl -n rabbit3 reset<br>
rabbitmqctl -n rabbit3 start_app<br>
rabbitmqctl -n rabbit3 stop_app<br>
rabbitmqctl -n rabbit3 cluster rabbit1@dfooks-ubuntu64 \<br>
rabbit2@dfooks-ubuntu64<br>
rabbitmqctl -n rabbit3 start_app<br>
<br>
Clustering can only take place when the state is *completely* reset - the fact that you are starting and stopping the app again between reset and cluster is recreating a blank database...<br>
<br>
<snip><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
{merge_schema_failed, "Incompatible schema cookies.<br>
</blockquote>
<snip><br>
<br>
...which is exactly what would lead to this error message.<br>
<br>
And yes, at some point we hope to make clustering easier to use.<br>
<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, VMware<br>
</font></span></blockquote></div><br></div>