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

Ben Hsu ben.hsu at criticalmedia.com
Fri Sep 13 23:45:04 BST 2013


Thank you Alvaro,

I understand  the difference between rabbitmq-server and rabbitmqctl now.

I'm still not able to copy or edit the Erlang cookie without killing the process. I see two different .erlang.cookie files: one in /var/lib/rabbitmq and one in the users home directory. I copied the first to the second and still got the "unable to connect" problem

I am running version 3.1.3.1 on CentOS
-- 
Ben Hsu
Sent with Airmail

On September 13, 2013 at 7:39:41 PM, Ben Hsu (ben.hsu at criticalmedia.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/20130913/a76745ca/attachment.htm>


More information about the rabbitmq-discuss mailing list