<div dir="ltr">Hi there ,<div><br></div><div style>Thank you for answer on this.�</div><div style><br></div><div style>I was away for few days so could not reply�immediately. I had managed to solve the problem.</div><div style>
It was on the similar lines as replied by Anton.�</div><div style><br></div><div style>1) First I copied the single cookie in all the nodes. It was /var/lib/rabbitmq path.</div><div style>2) Another problem was that the nodes were able to identify each other only by IP address and not by hostname and since in one of the post, I read its necessary that nodes identify each other by hostname as well since when we start nodes it picks node name. So edited /etc/hosts file on all the nodes and added IP address and hostname.�</div>
<div style><br></div><div style>Best Regards,</div><div style>Priyanki.�</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 23, 2013 at 10:23 AM, Anton Sizov <span dir="ltr">&lt;<a href="mailto:a.sysoff@gmail.com" target="_blank">a.sysoff@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi<div><br></div><div>1) Probably installation created files with rabbitmq user ownes. It is not good practice to run rabbitmq server with root�privileges. RabbitMQ need rights to read/write to mnesia and log dirs only. You can run RMQ with non root user.</div>
<div><br></div><div>2) Default place for .erlang.cookie file is user home directory. Probably at the installation RMQ places cookie in its installation dir (/var/lib/rabbitmq). Read�<a href="http://www.erlang.org/doc/reference_manual/distributed.html" target="_blank">http://www.erlang.org/doc/reference_manual/distributed.html</a>�and�<a href="http://www.rabbitmq.com/clustering.html" target="_blank">http://www.rabbitmq.com/clustering.html</a>�for more info about erlang cookie.</div>
<div><br></div><div>3) Your understanding is correct. RMQ uses only one cookie file. To be consistent you can delete one of them. Start with that placed in user home dir. Probably RMQ creates cookie in home dir when started not with rabbitmq user or not with init script (service rabbitmq strarted). I use precompiled RMQ�package that place in /opt dir.�</div>
<div><br></div><div>4) You doesn&#39;t I think. Different cookies can be the reason of such problems. To help you, it�necessary to know</div><div>- how you start rabbitmq node (1 and 2)</div><div>- try to start nodes not in cluster on different servers with the same cookie and with the full name resolving (-name flag instead of -sname). Then try to get status of each node from it server and from another.</div>
<div><br></div><div>[server1]# rabbitmq -n rabbtimq@server1 status<br>[server1]# rabbitmq -n rabbtimq@server2 status</div><div>[server2]# rabbitmq -n rabbtimq@server1 status</div><div>[server2]# rabbitmq -n rabbtimq@server2 status</div>
<div><br></div><div>It is minimum of actions to start resolve your problem.</div><div class="HOEnZb"><div class="h5"><div><br>On Tuesday, July 2, 2013 1:42:37 PM UTC+3, Priyanki Vashi wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi there ,<div><br></div><div>I had a question about erlang cookie, which gets generated when we start rabbitmq server. The situation is as follows.</div><div><br></div><div>1) Even if I did not created any user named &#39;rabbitmq&#39;, 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 ?�</div>
<div><br></div><div>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</div>
<div><br></div><div>3) Also these two erlang cookies are different from each other. Why there are two erlang cookie files gets generated ? What is the importance ?</div><div>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.<br>
</div><div>Is this correct understanding or ?�</div><div><br></div><div>4) Also do I need to configure different values of epmd ports when I want to run cluster with two physical nodes or it&#39;s OK to keep it as default ?�</div>
<div>� � I thought NO need to change but then since I am running into these problems thought of asking.�</div><div><br></div><div><br></div><div>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 &#39;rabbitmq in action&#39;, 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�</div>
<div>&quot;=ERROR REPORT==== 2-Jul-2013::19:48:28 ===</div><div>** Connection attempt from disallowed node rabbitmqctl40424@nazgul **&quot; , 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 ?</div>
<div><br></div><div>Error mesaage while stopping or restarting the node after copying erlang cookie from first node to second one.</div><div><div>Error: unable to connect to node rabbit_2@nazgul: nodedown</div><div><br></div>
<div>DIAGNOSTICS</div><div>===========</div><div><br></div><div>nodes in question: [rabbit_2@nazgul]</div><div><br></div><div>hosts, their running nodes and ports:</div><div>- nazgul: [{rabbit_2,58454},{rabbit,<u></u>38771},{rabbitmqctl40424,<u></u>60952}]</div>
<div><br></div><div>current node details:</div><div>- node name: rabbitmqctl40424@nazgul</div><div>- home dir: /var/lib/rabbitmq</div><div>- cookie hash: ad/NgkXjjR95x3cMejxwqg==</div></div><div><br></div><div><br></div><div>
Thank you in advance and please guide me so that I understand what had gone wrong here.</div><div><br></div><div>Best Regards,<br>Priyanki.</div><div><br></div><div><br></div></blockquote></div></div></div><br>_______________________________________________<br>

rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>