Failed to change RabbitMQ node authentication after changing cookie

I have several RabbitMQ nodes running on different machines. After installing each node, I could not specify a common cookie for each of them, so I had to go back and manually modify the .erlang.cookie file. My problem is that after this I get conflicting error messages. If I execute the status rabbitmqctl I get the following error:

DIAGNOSTICS

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

rabbit @ nc-mso-test01: * connected to epmd (port 4369) on nc-mso-test01 * epmd tells node rabbit running on port 25672 * TCP connection was successful, but Erlang failed

  • Authentication error (rejected by remote node), check Erlang cookie

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

Whatever I call the script, I get the same error. I tried to restart the service by uninstalling and installing it through rabbitmq-service. The error is saved. From what I can collect from other messages, the reason may be that node and the erlang broker work for individual users, and each of them has a different version of the cookie, one is stuck with the old one.

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

+7
windows cookies server rabbitmq messaging
source share
2 answers

I solved my problem. I missed the fact that there are two cookies in the RabbitMQ setup: one in c: \ Windows for the erlang component and one in C: \ Users \% USER%. As far as I understand, if the erlan virtual machine is launched on it by its own user of the application, and RabbitMQ node is started by another user, which would be my business, then the two cookies were different, and I had to synchronize them before synchronizing the cluster cookies.

+16
source share

The documentation reads:

The cookie used by the Windows service account and the user using the CLI tools must be synchronized. RabbitMQ-Clustering Guide

In versions of Erlang starting at 20.2, cookie locations:

  • For users running CLI tools, usually C:\Users\%USERNAME%\.erlang.cookie for user %USERNAME%
  • For the RabbitMQ Windows service, %USERPROFILE%\.erlang.cookie (usually C:\WINDOWS\system32\config\systemprofile )

In Erlang versions prior to 20.2 (e.g. 19.3 or 20.1) the location of the cookies:

  • For users running CLI tools, usually C:\Users\%USERNAME%\.erlang.cookie for user %USERNAME%
  • For the RabbitMQ Windows service, %WINDIR%\.erlang.cookie (usually C:\Windows\.erlang.cookie )
+5
source share

All Articles