解决RabbitMQ 3.7.2 && Erlang 20.2 for windows10安装之后rabbitmqctl命令出错的问题

本文介绍了RabbitMQ在Windows10环境下安装配置的过程及常见问题解决方案。针对使用rabbitmqctl status命令出现的错误,详细分析了原因并提供了解决方案,即确保.erlang.cookie文件的一致性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装RabbitMQ过程请参看http://blog.youkuaiyun.com/chwshuang/article/details/50543878

安装环境
  • RabbitMQ 3.7.2
  • Erlang20.2
  • Windows10

安装成功之后使用rabbitmqctl status命令之后出现如下错误

Status of node rabbit@GuoGuo-PC ...

Error: unable to perform an operation on node 'rabbit@GuoGuo-PC'. Please see diagnostics information and suggestions below.

Most common reasons for this are:

 * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
 * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
 * Target node is not running

In addition to the diagnostics info below:

 * See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit@GuoGuo-PC

DIAGNOSTICS
===========

attempted to contact: ['rabbit@GuoGuo-PC']

rabbit@GuoGuo-PC:
  * connected to epmd (port 4369) on GuoGuo-PC
  * 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

网上查了很多没有找到解决办法,最后注意到最后两行的内容,然后去官网的安装教程点击打开链接查看发现其中有这么一段

To ensure Erlang cookie files contain the same string,copy the .erlang.cookie file from the Windowsservice directory listed above to replace the user .erlang.cookie.

意思是要确保.erlang.cookie文件的一致性,问题就出在这里,不知道什么原因导致了C:\Users\{UserName}\.erlang.cookie和默认情况下C:\WINDOWS\System32\config\systemprofile\.erlang.cookie不一致了,将Windows目录下的拷贝到用户目录下就可以了。

评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值