Configuring the RabbitMQ Cluster on Windows Servers

I am trying to set up a RabbitMQ cluster on Windows servers, and this requires using a common Erlang cookie. According to the documentation, all I have to do is make sure that the root directories on different machines contain the same .erlang.cookie file. So I found these files on both machines and overwritten them with the same generic version.

After that, all rabbitmqctl commands failed on the machine with the new version of the file with the error message "could not connect to node ...". I tried to restart the RabbitMQ Windows service, but still complained about rabbitmqctl. I even reinstalled RabbitMQ on this machine, but then .erlang.cookie was reset back to the old version. Whenever I tried to use the new version of the cookie, rabbitmqctl failed. When I restored the old version, it worked perfectly.

Basically, I am stuck and cannot continue to configure the cluster until it solves this problem. Any help is appreciated.

UPDATE: a response was received from RabbitMQ: "rabbitmqctl will select a cookie from the user's home directory until the service selects it from the C: \ windows. Therefore, you will need to synchronize them with each other, as well as with another computer."

This basically means that the cookie should be replaced in two places: C: \ Windows and current_user.

+3
source share
1 answer

You are all right. The service will use cookies in C:\Windows, and when you use rabbitmqctl.batto request a status using a cookie in your user directory ( %USERPROFILE%).

When cookies do not match the error, look

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.8.2\sbin>rabbitmqctl.bat status
Status of node 'rabbit@PC-FOOBAR' ...
Error: unable to connect to node 'rabbit@PC-FOOBAR': nodedown

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

nodes in question: ['rabbit@PC-FOOBAR']

hosts, their running nodes and ports:
- PC-FOOBAR: [{rabbit,49186},{rabbitmqctl30566,63150}]

current node details:
- node name: 'rabbitmqctl30566@pc-foobar'
- home dir: U:\
- cookie hash: Vp52cEvPP1PukagWi5S/fQ==

cookie cookie RabbitMQ Windows... %HOMEDIR% %HOMEPATH% ( , homedir U:\), RabbitMQ cookie, , . , . gotcha, , cookie ( ), ( AFAIK).

, , RabbitMQ Windows.

+3

All Articles