1
votes

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.

1
What's your rabbitmqctl status?mpm
@mpm I have provided already the output of "rabbitmqctl status" in my post. Please read there the DIAGNOSTICS. Thanks.VeeAar
Sorry, I've missed that. Since rabbitmqctl status gives you node 'rabbit' not running at all and * suggestion: start the nod what makes you think that rabbitmq server is running?mpm
Could you provide as well epmd -names?mpm
@mpm C:\Program Files\erl9.0\erts-9.0\bin>epmd -names 'epmd: up and running on port 4369 with data: name rabbit at port 25672'VeeAar

1 Answers

2
votes

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.