Question

I am getting this error while starting rabbitmq server. I did following steps,

1) Installed rabbitmq sever on server1 and server2

2) It started successfully

3) Stopped it on server 2 using,

sudo service rabbitmq-server stop

4) copied /var/lib/rabbitmq/.erlang.cookie from server1 to server2.

5) Trying to start rabbitmq on server2 but getting error using

sudo service rabbitmq-server start

"rabbitmq failed to start"

6) I tried to reset it using but getting error

sudo rabbitmqctl force_reset

Forcefully resetting node 'rabbit@IS-21892' ...
Error: unable to connect to node 'rabbit@IS-21892': nodedown
diagnostics:
- nodes and their ports on IS-21892: [{rabbit,54812},{rabbitmqctl11166,34944}]
- current node: 'rabbitmqctl11166@IS-21892'
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: C2ak7NeiCEFHGEZb8SL7+w==

According to documentation

http://www.rabbitmq.com/troubleshooting.html

Cookie mismatch is due to different users, rabbitmq and root.

Whats the solution ?

I tried reinstalling as well.

Was it helpful?

Solution

I got it working,

In step 4, I was coping

/var/lib/rabbitmq/.erlang.cookie

from server1 to server2

/var/lib/rabbitmq/.erlang.cookie location.

But in addition to this, .erlang.cookie was created by rabbitmq at my home directory

/home/me/.erlang.cookie.

I copied it to server1 home/me and server 2 home/me/ as well.

With this I could create a cluster using

sudo rabbitmqctl cluster me@server1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top