<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;">Thank you Alvaro, turns out on my setup the rabbitmq user's home directory was /var/lib/rabbitmq, and I thought /var/lib/rabbitmq/.erlang.cookie was common to all users</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; margin: 0px; line-height: auto;"><br></div> <div class="" id="bloop_sign_1379348054556881920"><span style="font-family:helvetica,arial;font-size:13px"></span>-- <br>Ben Hsu<br><span>Sent with <a href="http://airmailapp.com/tracking">Airmail</a></span></div> <br><p style="color:#A0A0A8;">On September 13, 2013 at 7:39:41 PM, Alvaro Videla (videlalvaro@gmail.com) wrote:</p> <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;"><span><div>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>
</div></span></blockquote></body></html>