windows安装rabbitmq出现问题(2)

1、出现问题

执行命令

rabbitmqctl status

部分错误信息截取:
[email protected]:
* connected to epmd (port 4369) on LAPTOP-SDG10LIN
* 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

2、问题原因

.erlang.cookie文件在两处地方不一致导致的。使用软件everything查找
windows安装rabbitmq出现问题(2)

3、解决方法

官方给出方法:
Synchronise Erlang Cookies (when running a manually installed Windows Service) Erlang Security Cookies used by the service account and the user running rabbitmqctl.bat must be synchronised for rabbitmqctl.bat to function.
To ensure Erlang cookie files contain the same string, copy the.erlang.cookie file from the Windows directory (normally C:\WINDOWS.erlang.cookie) to replace the user.erlang.cookie. The user cookie will be in the user’s home directory (%HOMEDRIVE%%HOMEPATH%), e.g.C:\Documents and Settings\%USERNAME%.erlang.cookie or C:\Users\%USERNAME%.erlang.cookie (Windows Vista andlater).
整段话的意思就是:用系统windows文件夹下的.erlang.cookie覆盖usrs文件下的.erlang.cookie。简单的方法就是如上图,直接用everything搜索得到两处.erlang.cookie。用第二处换掉第一处。
成功如下图:
windows安装rabbitmq出现问题(2)