摘要

当使用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,现在可以执行命令了

相关链接:

http://www.rabbitmq.com/cli.html

[RabbitMQ]Windows环境下rabbitmqclt(Command Line Tools)出现Erlang distribution failed错误的解决方法的更多相关文章

  1. 使用layui异步请求上传图片在tp5.1环境下出现“请对上传接口返回json”的错误的解决方法

    正常情况下返回json数据使用return json(); 但是使用layui会报错,然后想到了使用json_encode()包装一下用一个变量接收后,再使用return();返回接收json格式的变 ...

  2. windows环境下Eclipse开发MapReduce程序遇到的四个问题及解决办法

    按此文章<Hadoop集群(第7期)_Eclipse开发环境设置>进行MapReduce开发环境搭建的过程中遇到一些问题,饶了一些弯路,解决办法记录在此: 文档目的: 记录windows环 ...

  3. 如何在OS X 10.9 Mavericks下安装Command Line Tools(命令行工具)

    随着OS X 10.9 于 2013年6月10日在旧金山WWDC(world wide developer conference)上发布.是首个不使用猫科动物命名的系统,而转用加利福尼亚的产物. 该系 ...

  4. asp.net下ueditor上传大容量视频报http请求错误的解决方法

    故障现象: 当使用百度编辑器ueditor上传大容量视频或大容量图片的时候,编辑器报“http请求错误”的解决方法详解: 原因分析: 目前很多CMS整合了百度的ueditor编辑器,但是上传稍微大一点 ...

  5. windows环境下基于pycharm安装Redis出现的两个错误解决方案

    说明:下面给出的两个链接是解决安装和使用Redis的时候遇到的两个问题参考的博客网址,本文有解释不清楚的地方可以原博客查看,侵权删! Q1参考链接-https://blog.csdn.net/maqu ...

  6. Linux 环境下umount, 报 device is busy 的问题分析与解决方法

    在Linux环境中,有时候需要挂载外部目录或硬盘等,但当想umount时,却提示类似“umount:/home/oracle-server/backup:device is busy”这种提示. 出现 ...

  7. Linux下Apache重启遇到No space left on device错误的解决方法

      解决办法:1.输入:ipcs -s 看有没有超过5个,如果有请执行下面2的命令:2.ipcs -s | perl -ane '/^0x00000000/ && `ipcrm -s ...

  8. macOS Mojave 10.14 无法安装brew缺少Command Line Tools for Xcode的解决办法

    问题描述: 首先我的版本是 Xcode 10.1 如果按照以前的方法安装brew 复制 1 /usr/bin/ruby -e "$(curl -fsSL https://raw.github ...

  9. Windows 7 64bit上安装Oracle Database 12c [INS-30131] 错误的解决方法

    Windows 7 64bit上安装Oracle Database 12c,出现以下错误: 解决方法: 第一步:控制面板>所有控制面板项>管理工具>服务>SERVER  启动 ...

随机推荐

  1. 转载《centos6安装nginx最详细步骤》

    出处:https://www.cnblogs.com/hltswd/p/6956264.html 第一步:在centos下面下载 nginx          wget http://nginx.or ...

  2. c++构造函数问题,初始化和赋值问题

    默认构造函数(就是没有参数的构造函数) The Default ConstructorThe default constructor is the constructor used to create ...

  3. CF581D Three Logos 暴力

    Three companies decided to order a billboard with pictures of their logos. A billboard is a big squa ...

  4. Es6中Map对象和Set对象的介绍及应用

    map和set的方法,工作中有使用到,所以学习一下: Map 对象 Map 对象保存键值对.任何值(对象或者原始值) 都可以作为一个键或一个值. var myMap = new Map(); myMa ...

  5. IDEA 文档注释 乱码 终极... 解决方案

    idea bin 目录 下           phpstorm64.exe.vmoptions  最后一行添加  : -Dfile.encoding=UTF-8

  6. xampp 在 windows下 配置 fcgi... 和 opcache 等 优化操作

    首先 修改 xampp 的 httpd.conf:(底部加入.方便修改) #fast-cgi 模式 LoadModule fcgid_module modules/mod_fcgid.so <I ...

  7. Petya and Origami

    Petya is having a party soon, and he has decided to invite his nn friends. He wants to make invitati ...

  8. Avito Cool Challenge 2018:D. Maximum Distance

    D. Maximum Distance 题目链接:https://codeforces.com/contest/1081/problem/D 题意: 给出一个连通图以及一些特殊点,现在定义cost(u ...

  9. 安装NetCDF及HDF5

    平台信息 Description: CentOS Linux release 7.6.1810 (Core) 安装步骤 下载NetCDF.HDF5.zlib.curl[使用wget命令即可] 解包:t ...

  10. Xshell设置主机名高亮

    修改后的效果: 操作步骤: 情况①:如果是Ubuntu或者Debian,按照下面的流程,两步解决: 打开~/.bashrc. 修改参数force_color_prompt=yes去掉前面的注释#. 情 ...