I installed erlang and rabbitmq in the way mentioned in the official documentation. But then, when I do this
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.0\sbin>rabbitmqctl add_user XXXXXX YYYYYYY
it gives me the following error...
Error: unable to perform an operation on node 'rabbit@C001741998'. Please see diagnostics information and suggestions below.
Most common reasons for this are:
In addition to the diagnostics info below:
attempted to contact: [rabbit@C001741998]
rabbit@C001741998:
connected to epmd (port 4369) on C001741998
epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
TCP connection succeeded but Erlang distribution failed
Authentication failed (rejected by the remote node), please check the Erlang cookie
Current node details:
node name: rabbitmqcli49@C001741998
effective user's home directory: C:\Users\XYZ
Erlang cookie hash: QJlwBuAgrn8gN00mjqQYOw==
I copied the erlang cookie from my user home folder to C:\Windows folder. So, they both have the same cookie. Still it keeps throwing me the error. Not sure how it should be fixed. Any help??
I figured out that the best way to run rabbitmq is from docker container. In that way, you do not need to bother about any cookie or dependencies, also you get rabbitmq up and running in few minutes. Hope it helps someone!
The Erlang cookie is a shared secret used for authentication between RabbitMQ nodes and CLI tools. The value is stored in a file commonly referred to as the Erlang cookie file. The cookie file used by the service account and the user running rabbitmqctl. bat must be synchronised for CLI tools such as rabbitmqctl.
The erlang cookie can be defined using the RABBITMQ_ERLANG_COOKIE variable. For example, if RabbitMQ is running on a Linux system, the export command can be used to define the erlang cookie. Or if running RabbitMQ on Docker, the -e or --env option can be used to define the Erlang cookie.
A RabbitMQ node is the basic "message broker" service (process running on a server) which provides core RabbitMQ features such as exchanges, virtual hosts, queues, etc. You need at least one RabbitMQ node to be up-and-running, to use RabbitMQ.
The docs says you should copy the other way...
If the Windows service is used, the cookie should be copied from C:\Windows\system32\config\systemprofile\.erlang.cookie to the expected location for users running commands like rabbitmqctl.bat.
See http://www.rabbitmq.com/cli.html
In case, like me, you need this stuff really spelling out:
%userprofile%
in the address bar.).erlang.cookie
in there, delete it. If not, just go to next step.C:\Windows\System32\config\systemprofile
..erlang.cookie
and copy it to your user directory.Now your rabbitmqctl
should be able to authenticate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With