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 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.