Search code examples
windowserlangrabbitmqrabbitmqctl

Unable to launch rabbitmq management console in Windows


On a Windows 7 Enterprise 64 Bit OS, I installed Erlang (otp_win64_20.0.exe) and RabbitMQ 3.6.9 (64bit) as standalone one. I have set System Variable for ERLANG_HOME. The installation was successful and RabbitMQ service is running.

But when I trying to enable rabbitmq_management, I am getting following error.

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.9\sbin>rabbitmq-plugins.bat enable rabbitmq_management
Plugin configuration unchanged.

Applying plugin configuration to rabbit@machinename... failed.
 * Could not contact node rabbit@machinename.
   Changes will take effect at broker restart.
 * Options: --online  - fail if broker cannot be contacted.
            --offline - do not try to contact broker.


C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.9\sbin>rabbitmqctl status
    Status of node rabbit@machinename ...
    Error: unable to connect to node rabbit@machinename: nodedown

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

attempted to contact: [rabbit@machinename]

rabbit@machinename:
  * connected to epmd (port 4369) on machinename
  * 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@machinename'
- home dir: C:\
- cookie hash: LLCyvm2Dd7VpUhtY9jxerg==   

I am going through various posts in stackoverflow and still could not figure out what is the root cause of this issue with node and management plugin.

Any help to resolve this is highly appreciated.


Solution

  • It looks like you have problem with `erlang.cookie. It contains key that allows connecting to Erlang node. You can read more about it in official documentation, but simplest solution can be found here

    Installing as a non-administrator user leaves .erlang.cookie in the wrong place

    This makes it impossible to use rabbitmqctl.

    Workarounds:

    Run the installer as an administrator or Copy the file .erlang.cookie manually from %SystemRoot% to %HOMEDRIVE%%HOMEPATH%.

    Where %SystemRoot% is normally C:\WINDOWS\.erlang.cookie and %HOMEDRIVE%%HOMEPATH%should be something like C:\Documents and Settings\%USERNAME%\.erlang.cookie or C:\Users\%USERNAME%\.erlang.cookie

    This should solve your problem.