[rabbitmq-discuss] Question about erlang cookie

Priyanki Vashi vashi.priyanki at gmail.com
Tue Jul 2 11:42:37 BST 2013


Hi there ,

I had a question about erlang cookie, which gets generated when we start 
rabbitmq server. The situation is as follows.

1) Even if I did not created any user named 'rabbitmq', there are files, 
which are owned by this user. Does the installation or startup of 
rabbitmq-server does this ? Also is it OK to use root user to do server 
administration operation or will it be considered not so good practice ? 

2) I use root user to start and stop rabbitmq server and when I start the 
server, I see that a file .erlang.cookie gets generated in root home dir. 
That is correct as per my understanding but I also see that there is 
another file with the same .erlang.cookie gets generated in 
/var/lib/rabbitmq

3) Also these two erlang cookies are different from each other. Why there 
are two erlang cookie files gets generated ? What is the importance ?
My theoretical understanding is there should be only one erlang cookie 
should get generated and that one should be in home dir of user, which 
starts the rabbitmq-server.
Is this correct understanding or ? 

4) Also do I need to configure different values of epmd ports when I want 
to run cluster with two physical nodes or it's OK to keep it as default ? 
    I thought NO need to change but then since I am running into these 
problems thought of asking. 


I would like to understand this bcoz, I tried to setup a cluster on two 
different physical machines and as per the guidelines gives in 'rabbitmq in 
action', before joining nodes running on different physical machines in the 
cluster, the erlang cookie should be sync meaning that both the nodes 
should have same erlang cookie so I tried to copy cookie from first node to 
second and tried to restart second node but then I had problems with 
restarting the node or even stopping the node and I get error. I also 
checked the latest log file and it says 
"=ERROR REPORT==== 2-Jul-2013::19:48:28 ===
** Connection attempt from disallowed node rabbitmqctl40424 at nazgul **" , 
which I believe is due to the fact that erlang cookie, which it had 
originally when I started the node has changed now and hence it does not 
allow me to stop the node. Is my understanding correct here or ?

Error mesaage while stopping or restarting the node after copying erlang 
cookie from first node to second one.
Error: unable to connect to node rabbit_2 at nazgul: nodedown

DIAGNOSTICS
===========

nodes in question: [rabbit_2 at nazgul]

hosts, their running nodes and ports:
- nazgul: [{rabbit_2,58454},{rabbit,38771},{rabbitmqctl40424,60952}]

current node details:
- node name: rabbitmqctl40424 at nazgul
- home dir: /var/lib/rabbitmq
- cookie hash: ad/NgkXjjR95x3cMejxwqg==


Thank you in advance and please guide me so that I understand what had gone 
wrong here.

Best Regards,
Priyanki.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130702/9626d1ff/attachment.htm>


More information about the rabbitmq-discuss mailing list