Windows – RabbitMQ node authentification failed after changing cookie file

cookiesmessagingrabbitmqserverwindows

I have multiple RabbitMQ nodes running on different machines. After installing each node I failed to specify a common cookie for each of them to use so I had to go back and manually change the file .erlang.cookie . My issue is that after doing this I get conflicting error messages. If i do rabbitmqctl status
I get the following error:

DIAGNOSTICS

attempted to contact: ['rabbit@nc-mso-test01']

rabbit@nc-mso-test01: * connected to epmd (port 4369) on
nc-mso-test01 * epmd reports node 'rabbit' running on port 25672 *
TCP connection succeeded but Erlang distribution failed

  • Authentication failed (rejected by the remote node), please check
    the Erlang cookie

current node details:
– node name: 'rabbitmq-cli-45@nc-mso-test01'
– home dir: C:\Users\jol
– cookie hash: 9/Hx6l+wLQv3NkmSDFqBog==

Whatever script I call, I get the same error. I tried restarting the service, removing and installing it through rabbitmq-service. The error persists. From what I can gather from other posts, the reason might be that the node and the erlang broker are running on separate users and each of them have a different version of the cookie, one is stuck with the old one.

How can I make the server and node restart, so that both of them use the new cookie file?

Best Answer

I solved my issue. I missed the fact that the RabbitMQ setup has two cookie files, one in c:\Windows for the erlang component, and one in C:\Users\%USER%. From what I understand, if the erlan VM is started on it's own application user and the RabbitMQ node is started on a different user, which would have been my case, then the two cookie files were different and I had to sync those up before syncing the cluster cookies.

Related Topic