[rabbitmq-discuss] Re: Proper process to change erlang cookie?

Ben Hsu ben.hsu at criticalmedia.com
Mon Sep 16 17:15:48 BST 2013


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

-- 
Ben Hsu
Sent with Airmail

On September 13, 2013 at 7:39:41 PM, Alvaro Videla (videlalvaro at gmail.com) wrote:

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.

start_app stops the Rabbit application inside the Erlang VM but the VM has to be running for that to work. 

stop_app will stop the rabbit app, but not the Erlang VM

rabbitmq-server takes care of preparing the env parameters and starting the Erlang VM to then run RabbitMQ on it.

Regards,

Alvaro

On Friday, September 13, 2013, Ben Hsu wrote:
Hello all

I need to change the erlang cookie on my RabbitMQ server to get clustering working, and wish to know the correct procedure.

I tried doing this:

rabbitmqctl stop_app
vi /var/lib/rabbitmq/.erlang.cookie
rabbitmqctl start_app # this gave me an error message: Error: unable to connect to node 'rabbit at ben-amqp-test4': nodedown

By trial and error, I found this worked:
pkill beam
pkill epmd
vi /var/lib/rabbitmq/.erlang.cookie
rabbitmq-server 
# now in a separate window, for some reason it didn't work with rabbitmq-server -detached
rabbitmqctl start_app

That seemed to work, but is ugly, and doesn't feel like the right way of doing it.

Also, what is the difference between "rabbitmqctl start_app" and "rabbitmq-server"?

Thanks in advance

-- 
Ben Hsu
Sent with Airmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130916/f7b5ffed/attachment.htm>


More information about the rabbitmq-discuss mailing list