当执行:rabbitmq-plugins.bat enable rabbitmq_management 命令时候出现
错误如下:
Plugin configuration unchanged.
Applying plugin configuration to rabbit@hj... failed.
Could not contact node rabbit@hj. Changes will take effect at broker restart.
Options: --online - fail if broker cannot be contacted. --offline - do not try to contact broker.
然后按照网上找的方案如下: 【没有解决我的问题】
https://www.cnblogs.com/amylis\_chen/p/6286238.html
解决方法:
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 orC:\Users\%USERNAME%\.erlang.cookie (Windows Vista and later).
同步Erlang Cookies
具体操作:将 C:\WINDOWS\.erlang.cookie 同步到RabbitMq 启动用户 例如win10:C:\Users\%USERNAME%\.erlang.cookie
官方安装手册: http://www.rabbitmq.com/install-windows-manual.html
通过分析和网上查找,我的解决方案如下:
1、删除C:\Users\Admin(你登录的机器名) 和 C:\Windows 下的 .erlang.cookie 文件
2、找到本机目录:C:\Users\Admin\AppData\Roaming\RabbitMQ 下的enabled_plugins 文件 ,随便重命名一下【如:enabled_plugins.bak】;
3、再次执行:rabbitmq-plugins.bat enable rabbitmq_management 命令,完美通过;【管理员执行】
4、然后执行:rabbitmq-service install 命令,居然有出现其他问题(有时候是乱码哦):
C:\Users\Administrator>rabbitmq-service install
RabbitMQ service is already present - only updating service parameters
C:\Program Files\erl5.10.3\erts-5.10.3\bin\erlsrv: Warning, could not set correct interactive mode.
Error: 句柄无效。
C:\Program Files\erl5.10.3\erts-5.10.3\bin\erlsrv: Warning, could not set correct service description (comment)Error: 句柄无效。
5、解决上面问题,如下:
解决办法是:1、卸载erlang,并且去注册表里HKLM/SOFTWARE/Ericsson/Erlang/ErlSrv下的项清掉,2、然后重新已管理员身份安装erlang3、erlang重装完成后,若RabbitMQ service 未安装,则通过执行命令:rabbitmq-service install 安装service;4、执行命令:rabbitmq-service start 启动service
6、完美解决.
如果有其他问题,请留言!
参考