解决Error: unable to perform an operation on node ‘rabbit@DESKTOP-xxx‘. Please see diagnostics informa

导读:本篇文章讲解 解决Error: unable to perform an operation on node ‘rabbit@DESKTOP-xxx‘. Please see diagnostics informa,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

1. 复现问题

今天登录rabbitMq后台管理,输入用户名和密码后,却报出这个错误:Not management user,如下图所示:

在这里插入图片描述

于是,决定执行命令rabbitmqctl list_users查看是否有这个用户。

  1. 首先在D:\Software\rabbitmq\rabbitmq_server-3.8.15\sbin目录下输入cmd:

在这里插入图片描述

在这里插入图片描述

  1. cmd命令窗口执行如下指令:
rabbitmqctl list_users

却报出如下错误:

D:\Software\rabbitmq\rabbitmq_server-3.8.15\sbin>rabbitmqctl list_users
Error: unable to perform an operation on node 'rabbit@DESKTOP-UVTEHFR'. 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 https://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit@DESKTOP-UVTEHFR
 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools

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

attempted to contact: ['rabbit@DESKTOP-UVTEHFR']

rabbit@DESKTOP-UVTEHFR:
  * connected to epmd (port 4369) on DESKTOP-UVTEHFR
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on DESKTOP-UVTEHFR
  * suggestion: start the node

Current node details:
 * node name: 'rabbitmqcli-999-rabbit@DESKTOP-UVTEHFR'
 * effective user's home directory: C:\Users\zxy
 * Erlang cookie hash: pkFzX53V7Ok1QDOYqiMzXg==

2. 分析问题

将上述错误信息中这句话Error: unable to perform an operation on node 'rabbit@DESKTOP-UVTEHFR'. 翻译成中文为错误:无法在节点 'rabbit@DESKTOP-UVTEHFR 上执行操作

为什么无法在节点'rabbit@DESKTOP-UVTEHFR 上之心操作呢?

于是去查找资料,网上说错误的原因是Erlangcookie出现问题,Erlang会生成两个cookie文件,文件目录如下所示:

  1. C:\Windows\System32\config\systemprofile\.erlang.cookie,但我的C:\Windows\System32\config\systemprofile\目录下并没有这个.erlang.cookie文件:

在这里插入图片描述

  1. C:\用户\你的用户名\.erlang.cookie,比如我的地址为C:\Users\zxy\.erlang.cookie,如下图所示:

在这里插入图片描述

用后者的文件替换掉前者的文件。

3. 解决问题

C:\用户\你的用户名\目录下的.erlang.cookie文件复制到C:\Windows\System32\config\systemprofile\目录,如下图所示:

在这里插入图片描述

如果C:\Windows\System32\config\systemprofile\已经存在.erlang.cookie文件,使用C:\用户\你的用户名\目录下的.erlang.cookie文件替换掉即可。

双击rabbitmq-server.bat重启rabbitmq服务,如下图所示:

在这里插入图片描述
在这里插入图片描述

cmd命令行窗口再次输入rabbitmqctl list_users即可:

在这里插入图片描述

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之家整理,本文链接:https://www.bmabk.com/index.php/post/99138.html

(0)
小半的头像小半

相关推荐

极客之家——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!