The Erlang cookie belongs to each particular user on your machines. The cookie can be found on ~/.erlang.cookie and you need to have the same value there for every node in the cluster.<div><br></div><div>start_app stops the Rabbit application inside the Erlang VM but the VM has to be running for that to work. </div>
<div><br></div><div>stop_app will stop the rabbit app, but not the Erlang VM</div><div><br></div><div>rabbitmq-server takes care of preparing the env parameters and starting the Erlang VM to then run RabbitMQ on it.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Alvaro<span></span><br><br>On Friday, September 13, 2013, Ben Hsu wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto">Hello all</div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto"><br>
</div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto">I need to change the erlang cookie on my RabbitMQ server to get clustering working, and wish to know the correct procedure.</div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto">
<br></div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto">I tried doing this:</div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto"><br></div><div style="font-family:Helvetica,Arial;margin:0px">
rabbitmqctl stop_app</div><div style="font-family:Helvetica,Arial;margin:0px">vi /var/lib/rabbitmq/.erlang.cookie</div><div style="font-family:Helvetica,Arial;margin:0px"></div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto">
rabbitmqctl start_app # this gave me an error message: <i>Error: unable to connect to node 'rabbit@ben-amqp-test4': nodedown</i></div><div style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto">
<div><br></div><div>By trial and error, I found this worked:</div><div>pkill beam</div><div>pkill epmd</div><div style="margin:0px">vi /var/lib/rabbitmq/.erlang.cookie</div><div style="margin:0px"></div><div>rabbitmq-server </div>
<div># now in a separate window, for some reason it didn't work with rabbitmq-server -detached</div><div>rabbitmqctl start_app</div><div><br></div><div>That seemed to work, but is ugly, and doesn't feel like the right way of doing it.</div>
<div><br></div><div>Also, what is the difference between "rabbitmqctl start_app" and "rabbitmq-server"?</div><div><br></div><div>Thanks in advance</div></div><div><div><div> </div></div></div><br><div>
<span style="font-family:helvetica,arial;font-size:13px"></span>-- <br>Ben Hsu<br><span>Sent with <a href="http://airmailapp.com/tracking" target="_blank">Airmail</a></span></div></div></blockquote></div>