[rabbitmq-discuss] RabbitMQ Cluster, option "-setcookie cookie" + EC2 experiences

Matthias Radestock matthias at lshift.net
Wed Mar 11 13:22:36 GMT 2009


Alex,

Alex Clemesha wrote:
> Currently, I have "fixed" my setcookie issue by bundling a Rabbit AMI, which,
> in turn, bundles the .erlang.cookie with it.  Now every instance of the AMI will
> have the same cookie - so these instances can cluster with each other
> ... Not the cleanest solution, but it works for now.

I reckon that is a perfectly acceptable solution.

> In this document: http://www.rabbitmq.com/clustering.html, there is this line:
> "As an alternative, you can insert the option "-setcookie
> cluster_cookie" in the erl call in the rabbitmq-server and rabbitmqctl
>  scripts."
> 
> Does this imply I should modify the rabbitmq-server and rabbitmqctl
> scripts to have this functionality, or is there some way
> (that I'm not seeing yet) to pass "-setcookie cluster_cookie" to
> rabbitmq-server and rabbitmqctl scripts?

You can either edit the scripts (rabbitmq-server, rabbitmq-multi and 
rabbitmqctl) or add the "-setcookie ..." to SERVER_ERL_ARGS and 
MULTI_ERL_ARGS in /etc/rabbitmq/rabbitmq.conf. Make sure you copy the 
existing settings of RABBITMQ_SERVER_ERL_ARGS across from the script 
though. However, I've just noticed that rabbitmqctl doesn't source 
/etc/rabbitmq/rabbitmq.conf, so the only way to change the cookie for 
that is to edit the script. I have filed a bug to fix that.

> Status of node 'rabbit at ip-10-250-19-15' ...\n\n=ERROR REPORT====
> 10-Mar-2009::21:10:49 ===\nError in process <0.35.0> on node
> 'rabbitmqctl1437 at ip-10-250-19-15' with exit value:
> {badarg,[{erlang,list_to_existing_atom,[\"rabbit@(none)\"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}\n\n{badrpc,nodedown}\n...done.
> 
> This interesting part is the "rabbit@(none)" part I think.  A hostname
> issue of some sort?

It certainly looks like the rabbit node failed to get hold of the 
hostname. Might be a timing issue, i.e. perhaps DNS is in a state of 
flux / broken just after an image comes up.

Btw, what version of Erlang are you running?


Matthias.




More information about the rabbitmq-discuss mailing list