RabbitMq无法连接([AMQP Connection xx.xx.xx.xx:5672-119] ERROR com.rabbitmq.client.impl.ForgivingExcept)

报错信息

[AMQP Connection xx.xx.xx.xx:5672-119] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler 119 log - An unexpected connection driver error occured java.net.SocketException: socket closed
我的服务器原来安装过RabbitMq 而且一直用的挺舒适,大概几个月没用,今天想用mqtt协议,但是启动的时候给我提示这个错误。一脸懵逼,之前明明好好的,怎么就突然不让连接了呢?这种事情最讨厌了。

  • 第一反应是账号权限问题,但是发现没问题。
  • 然后看了一下状态rabbitmqctl status
C:\Users\Administrator>rabbitmqctl status
Status of node rabbit@xxxxxx ...
Error: unable to perform an operation on node 'xxxxxxx'. Please s
ee diagnostics information and suggestions below.

Most common reasons for this are:

* Target node is unreachable (e.g. due to hostname resolution, TCP connection o
r 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/document
ation.html to learn more
* Consult server logs on node rabbit@xxxxxx

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

attempted to contact: [xxxxxxx]

rabbit@iZpa12hzjf4z5qZ:
 * connected to epmd (port 4369) onxxxxx
 * epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traff
ic
 * TCP connection succeeded but Erlang distribution failed

 * Authentication failed (rejected by the remote node), please check the Erlang
cookie


Current node details:
* node name: rabbitmqcli72@xxxxxx
* effective user's home directory: C:\Users\Administrator
* Erlang cookie hash: xxxxxx

然后参考了一下 https://blog.csdn.net/J_Shine/article/details/78833456

找到C:\Windows\System32\config\systemprofile下有个.erlang.cookie文件,内容与C:\User\lujie.erlang.cookie不一样,不让编辑,于是复制了一下,使内容一致,然后重启,再rabbitmqctl status 正常了,但是连接仍然报错。没完没了了还…

Virtual host / experienced an error on node rabbit@wohu-rabbit and may be  inaccessible

在这里插入图片描述
发现这个问题后 我找到了RabbitMq的安装目录 下面有个db文件夹,我把里面东西都删掉了(需要权限->先进去删,然后再出来删)。
重启,解决。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值