无法在 Windows 中启动 rabbitmq 管理控制台

Unable to launch rabbitmq management console in Windows

在 Windows 7 Enterprise 64 位 OS 上,我安装了 Erlang (otp_win64_20.0.exe) 和 RabbitMQ 3.6.9 (64bit) 作为独立的。我已经为 ERLANG_HOME 设置了系统变量。安装成功,RabbitMQ服务为运行。

但是当我尝试启用 rabbitmq_management 时,出现以下错误。

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

我正在浏览 Whosebug 中的各种帖子,但仍然无法找出节点和管理插件出现此问题的根本原因。

非常感谢任何解决此问题的帮助。

看来您对 `erlang.cookie 有疑问。它包含允许连接到 Erlang 节点的密钥。您可以在 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%.

其中 %SystemRoot% 通常是 C:\WINDOWS\.erlang.cookie%HOMEDRIVE%%HOMEPATH% 应该是 C:\Documents and Settings\%USERNAME%\.erlang.cookieC:\Users\%USERNAME%\.erlang.cookie

这应该可以解决您的问题。