博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[RabbitMQ]Windows环境下rabbitmqclt(Command Line Tools)出现Erlang distribution failed错误的解决方法...
阅读量:4469 次
发布时间:2019-06-08

本文共 1492 字,大约阅读时间需要 4 分钟。

摘要

当使用rabbitmqctl时出现Erlang distribution failed,把%SystemRoot%Windows\System32\config\systemprofile下的.erlang.cookie 复制到%SystemRoot%\Users\UsersName后重启RabbitMQ服务

前情概要

今天在使用RabbitMQ突然无法登陆Web Management,用rabbitmqctl的list_user命令查看用户时发现报了如下错误

attempted to contact: ['rabbit@nodeB']

rabbit@nodeB:
* connected to epmd (port 4369) on nodeB
* 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: rabbitmqcli70@NULL
- effective user's home directory: C:\Users\**
- Erlang cookie hash: *********==

重点在这两行

TCP connection succeeded but Erlang distribution failed

please check the Erlang cookie

因此,重点从erlang cookie下手

解决过程

百度和stackoverflow,无果,基本都是用管理员身份重装RabbitMQ,然而实际问题并不在此。于是直奔官网。

在RabbitMQ官网Command Line Tools下发现erlang Cookie除了Users文件夹下还有另一个存放的地方,对比发现systemprofile里的才是正确的cookie,替换Users下的cookie后重启RabbitMQ ,运行rabbitmqctl,可以正常运行命令了

正常运行list_user发现guest用户被删除了,重新利用rabbitmqctl建立一个管理员用户之后终于可以登录Management了。以防万一,也为了调试方便,在Admin页面重新建立guest用户。

实际上,RabbitMQ nodes与CLT tools利用erlang cookie来辨认它们之间是否能互相连接,若两个erlang cookie不一致则无法使用CLI tools

下面贴出解决方法,有兴趣的可以去最下方的链接,在RabbitMQ官网查看具体说明

解决方法

  1. %SystemRoot%Windows\System32\config\systemprofile\中复制.erlang.cookie
  2. <%SystemRoot%\Users\UsersName>中把上一步的.erlang.cookie覆盖此文件夹的.erlang.cookie(以防万一先复制副本)
  3. 重启RabbitMQ服务,这一步应该可以忽略
  4. 重新打开rabbitmqctl,现在可以执行命令了

相关链接:

转载于:https://www.cnblogs.com/mirageJ/p/9041451.html

你可能感兴趣的文章
DS博客作业08-课程总结
查看>>
利用Python爬虫刷店铺微博等访问量最简单有效教程
查看>>
浅谈软件测试与墨菲定律
查看>>
文件安全复制之 FastCopy
查看>>
强烈推荐美文之《从此刻起,我要》
查看>>
敏捷开发流程
查看>>
对Netflix Ribbon的Loadbalancer类源码设计合理性的一点质疑
查看>>
关于日历的算法
查看>>
[QT编程]QT实现的一个渐隐渐显窗体
查看>>
在Web工程中引入Jquery插件报错解决方案
查看>>
[myeclipse]@override报错问题
查看>>
超简单的listview单选模式SingleMode(自定义listview item)
查看>>
HDU 1199 - Color the Ball 离散化
查看>>
[SCOI2005]骑士精神
查看>>
Hibernate原理解析-Hibernate中实体的状态
查看>>
六时车主 App 隐私政策
查看>>
C语言常见问题 如何用Visual Studio编写C语言程序测试
查看>>
Web用户的身份验证及WebApi权限验证流程的设计和实现
查看>>
hdu 2098 分拆素数和
查看>>
ECMAScript6-let与const命令详解
查看>>