[rabbitmq-discuss] A cluster on a single machine

David Fooks davidfooks at turbulenz.biz
Fri May 4 17:46:29 BST 2012


I'm trying to emulate the guide here: 

But I'm having a lot of issues! Every time I run I seem to be getting a 
different crash. Is this feature actually supported in 2.8.1?

Is there a proper way to completely reset all of the state that rabbitmq 
creates about other nodes/the cluster? My clean up script at the moment 
looks like this:

rm /var/run/rabbitmq/*
rm -f /var/log/rabbitmq/*
rm -rf /var/lib/rabbitmq/*

Here is my start-up script (I'm running this with sudo):

RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners 
[{mgmt,[{port,55672}]}]" rabbitmq-server -detached
RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners 
[{mgmt,[{port,55673}]}]" rabbitmq-server -detached
RABBITMQ_SERVER_START_ARGS="-rabbitmq_mochiweb listeners 
[{mgmt,[{port,55674}]}]" rabbitmq-server -detached

ps -ef | grep rabbit1 | grep -v grep | awk '{print $2}' > 
ps -ef | grep rabbit2 | grep -v grep | awk '{print $2}' > 
ps -ef | grep rabbit3 | grep -v grep | awk '{print $2}' > 

rabbitmqctl -n rabbit1 wait /var/run/rabbitmq/rabbit1.pid
rabbitmqctl -n rabbit2 wait /var/run/rabbitmq/rabbit2.pid
rabbitmqctl -n rabbit3 wait /var/run/rabbitmq/rabbit3.pid

rabbitmqctl -n rabbit1 stop_app
rabbitmqctl -n rabbit1 reset
rabbitmqctl -n rabbit1 start_app

rabbitmqctl -n rabbit2 stop_app
rabbitmqctl -n rabbit2 reset
rabbitmqctl -n rabbit2 start_app

rabbitmqctl -n rabbit3 stop_app
rabbitmqctl -n rabbit3 reset
rabbitmqctl -n rabbit3 start_app

rabbitmqctl -n rabbit1 status
rabbitmqctl -n rabbit2 status
rabbitmqctl -n rabbit3 status

rabbitmqctl -n rabbit3 stop_app
rabbitmqctl -n rabbit3 cluster rabbit1 at dfooks-ubuntu64 
rabbit2 at dfooks-ubuntu64
rabbitmqctl -n rabbit3 start_app

If I run the "clean" script and then this script I get the following 
warning (after all of the status returns ok):

Stopping node 'rabbit3 at dfooks-ubuntu64' ...
Clustering node 'rabbit3 at dfooks-ubuntu64' with ['rabbit1 at dfooks-ubuntu64',
                                                'rabbit2 at dfooks-ubuntu64'] 
Error: {unable_to_join_cluster,
           ['rabbit1 at dfooks-ubuntu64','rabbit2 at dfooks-ubuntu64'],
               "Incompatible schema cookies. Please, restart from old 
backup.'rabbit1 at dfooks-ubuntu64' = 
[{name,schema},{type,set},{ram_copies,[]},{disc_copies,['rabbit1 at dfooks-ubuntu64']},{disc_only_copies,[]},{load_order,0},{access_mode,read_write},{index,[]},{snmp,[]},{local_content,false},{record_name,schema},{attributes,[table,cstruct]},{user_properties,[]},{frag_properties,[]},{cookie,{{1336,149567,596521},'rabbit1 at dfooks-ubuntu64'}},{version,{{3,0},{'rabbit1 at dfooks-ubuntu64',{1336,149572,870479}}}}], 
'rabbit3 at dfooks-ubuntu64' = 
[{name,schema},{type,set},{ram_copies,['rabbit3 at dfooks-ubuntu64']},{disc_copies,['rabbit2 at dfooks-ubuntu64']},{disc_only_copies,[]},{load_order,0},{access_mode,read_write},{index,[]},{snmp,[]},{local_content,false},{record_name,schema},{attributes,[table,cstruct]},{user_properties,[]},{frag_properties,[]},{cookie,{{1336,149568,520459},'rabbit2 at dfooks-ubuntu64'}},{version,{{3,0},{'rabbit3 at dfooks-ubuntu64',{1336,149572,882518}}}}]\n"}}
Starting node 'rabbit3 at dfooks-ubuntu64' ...
Error: {cannot_start_application,rabbitmq_management,

I've read about this error in other threads but it generally seems to be 
about network settings being reconfigured between nodes. I shouldn't have 
these problems since each instance is on the same machine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120504/72c26779/attachment.htm>

More information about the rabbitmq-discuss mailing list