说明

本来是要先把Hystrix 仪表盘更完的,但是出现了Turbine、Dashboard、RabbitMQ整合实现监控。

所以先在学RabbitMq的基本操作,在安装过程中出现了

E:\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>rabbitmqctl status
Status of node 'rabbit@DESKTOP-T5RBR6M' ...
Error: unable to connect to node 'rabbit@DESKTOP-T5RBR6M': nodedown DIAGNOSTICS
=========== attempted to contact: ['rabbit@DESKTOP-T5RBR6M'] rabbit@DESKTOP-T5RBR6M:
* connected to epmd (port 4369) on DESKTOP-T5RBR6M
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
* suggestion: is the Erlang distribution using TLS? current node details:
- node name: 'rabbitmq-cli-27@DESKTOP-T5RBR6M'
- home dir: C:\Users\Administrator
- cookie hash: +Xg8GwzCRQiqRrJZqqF30A==

重点在TCP connection succeeded but Erlang distribution failedsuggestion: is the cookie set correctly?这两行,在网上看了两个小时了,发现很多都是不明所以弄成了就随便捊一下就写。。

有一些现在没有suggestion的输出,这不是很重要,这里我先恢复事故现场,大家一起踩坑

WorkArounds

问题复现

分别安装 Erlang (otp_win64_20.3.exe) 、RabbitMQ Server(rabbitmq-server-3.7.5.exe)

这里为了能看清晰问题是出在安装目录上还是其它,都装到D盘,其他不变

安装完成在菜单栏中会有这个显示,这里用win10演示(公司电脑)

查看服务,服务已经正常启动

cmd命令cd到D:\RabbitMQ Server\rabbitmq_server-3.7.5\sbin (你实际的安装位置)

小提示:如果是默认的安装位置,用 可以直接定位到sbin下

输入rabbitmqctl status

D:\RabbitMQ Server\rabbitmq_server-3.7.5\sbin>rabbitmqctl status
Status of node rabbit@DESKTOP-T5RBR6M ...
Error: unable to perform an operation on node 'rabbit@DESKTOP-T5RBR6M'. 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@DESKTOP-T5RBR6M DIAGNOSTICS
=========== attempted to contact: ['rabbit@DESKTOP-T5RBR6M'] rabbit@DESKTOP-T5RBR6M:
* connected to epmd (port 4369) on DESKTOP-T5RBR6M
* 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 Current node details:
* node name: 'rabbitmqcli49@DESKTOP-T5RBR6M'
* effective user's home directory: C:\Users\Administrator
* Erlang cookie hash: joVCp1tjZbhK/nWhgoYyjQ==

问题复现。

Authentication failed (rejected by the remote node), please check the Erlang cookie是重点,说明cookie可能有问题。

问题解决

这里直接告诉大家问题出在哪吧,是Erlang新版本的cookie位置换了!

两种解决办法:

  • 使用旧版本Erlang
  • cookie替换到正确的位置

打开路径C:\Windows\System32\config\systemprofile

我们看到了这里有一个.erlang.cookie,复制这个文件到C:\Users\你的用户名

如果没有这个文件,请打开菜单栏的Erlang快捷方式,出现白色窗口的时候,C:\Windows\System32\config\systemprofile这个目录下就会出现这个文件,可能会慢一些耐心等

要确保C:\Windows\System32\config\systemprofileC:\Users\你的用户名下的cookie是同一个文件!

替换完成后,无需重启服务,直接rabbitmqctl status,如图这样就成功了。

以上

RabbitMQ问题解决:TCP connection succeeded but Erlang distribution failed的更多相关文章

  1. [RabbitMQ]Windows环境下rabbitmqclt(Command Line Tools)出现Erlang distribution failed错误的解决方法

    摘要 当使用rabbitmqctl时出现Erlang distribution failed,把%SystemRoot%Windows\System32\config\systemprofile下的. ...

  2. TCP connection status

    A TCP connection progresses through a series of states during its lifetime. The following diagram il ...

  3. linux上TCP connection timeout的原因查找

    linux上TCP connection timeout的原因查找 好久没有写文章了, 今天解决了一个网络连接超时的问题, 记录以备查看. 最近在线上nginx经常出现输出connection tim ...

  4. TCP Connection Establishment and Termination

    Three-Way Handshake The following scenario occurs when a TCP connection is established: The server m ...

  5. RT:How HTTP use TCP connection

    In HTTP/0.9 (not used anymore), each request uses a separate TCP connection, and the end of a respon ...

  6. Caused by: com.rabbitmq.client.ShutdownSignalException: connection error

    周五下午的时候升级了一个环境,跑了批处理sh升级脚本后,启动时报下列错误: INFO | jvm 1 | 2017/02/24 17:39:09 | java.io.IOException INFO ...

  7. tcp connection

    三次握手与四次挥手的原因 https://yq.aliyun.com/articles/7435?spm=5176.8091938.0.0.N4v33a linux里的backlog详解 tcp co ...

  8. Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space

    在Eclipse 调试 springside showcase项目中,tomcat报异常 Exception in thread "RMI TCP Connection(idle)" ...

  9. the age of the TCP connection TCP Slow Start

    w防止网络过载和拥塞 HTTP The Definitive Guide The performance of TCP data transfer also depends on the age of ...

随机推荐

  1. Mscomm控件安装问题 License information for TMSComm not found.

    操作步骤: 1.打开delphi,菜单选择compoents->import Activex control,然后选择那个mscomm32.ocx安装即可. 2.注册MScomm控件   开始- ...

  2. 【百度】大型网站的HTTPS实践(二)——HTTPS加密算法介绍

    大型网站的HTTPS实践(二)——HTTPS加密算法介绍 原创 网络通信/物联网 作者:AIOps智能运维 时间:2018-11-09 15:09:43  358  0 前言 在上一篇文章中,我们简要 ...

  3. [转帖]学习一下centos7 新地方

    总结的挺好  copy一下 慢慢学习: http://blog.itpub.net/312079/viewspace-2214440/ Centos7 单用户模式 centos7里不再有0-6启动级别 ...

  4. centos升级内核(rpm方式)

    #rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org 如果失败的话多试几次,感觉网络不是很好#rpm -ivh http://www. ...

  5. Tomcat 总体结构

    一.Tomcat 总体结构 1.Server(服务器)是Tomcat构成的顶级构成元素,所有一切均包含在Server中,Server的实现类StandardServer可以包含一个到多个Service ...

  6. Memcache服务器端+Redis服务器端+PHP Memcache扩展+PHP Memcached扩展+PHP Redis扩展+MemAdmin Memcache管理工具+一些概念(更新中)

    Memcache和Redis因为操作简单,是我们常用的服务器数据缓存系统,以下文字仅作备忘记录,部份转载至网络. 一.定义 1.Memcache Memcache是一个高性能的分布式的内存对象缓存系统 ...

  7. 【uoj#37/bzoj3812】[清华集训2014]主旋律 状压dp+容斥原理

    题目描述 求一张有向图的强连通生成子图的数目对 $10^9+7$ 取模的结果. 题解 状压dp+容斥原理 设 $f[i]$ 表示点集 $i$ 强连通生成子图的数目,容易想到使用总方案数 $2^{sum ...

  8. zabbix自定义web检测

    zabbix自定义web检测 本博客使用zabbix 版本 4.0.3 Web监控的原理 Web监控即对HTTP服务的监控,模拟用户去访问网站,对特定的结果进行比较,如状态码.返回字符串等特定的数据进 ...

  9. c++11 闭包的实现

    c++11 闭包的实现 什么是闭包 闭包有很多种定义,一种说法是,闭包是带有上下文的函数.说白了,就是有状态的函数.更直接一些,不就是个类吗?换了个名字而已. 一个函数,带上了一个状态,就变成了闭包了 ...

  10. MT【136】一道三次函数的最佳逼近问题

    已知函数\(f(x)=-x^3-3x^2+(1+a)x+b(a<0,b\in R)\), 若\(|f(x)|\)在\([-2,0]\)上的最大值为\(M(a,b)\),求\(M(a,b)\)的最 ...