RabbitMQ Node rabbit@emily1 thinks its clustered with node rabbit@emily2, but rabbit disagrees

warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
Error: unable to perform an operation on node 'rabbit@emily2'. 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@emis2
 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools

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

attempted to contact: [rabbit@emis2]

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

Current node details:
 * node name: 'rabbitmqcli-2879-rabbit@emily2'
 * effective user's home directory: /var/lib/rabbitmq
 * Erlang cookie hash: MRFkIwPZlMRWZvXka/6Rsg==

RabbitMQ报以上错误时是由于当前节点mnesia数据库中记录还在集群之中,但是集群确认为其已经不咋集群中了,解决方案是:

  1. 删除当前节点/var/lib/rabbit/mnesia数据库记录
  2. 确保/var/lib/rabbit/.erlang.cookie中的key和集群中的保持一致
  3. rabbitmq-server start -detached启动erlang和rabbitmq服务器
  4. rabbitmqctl stop_app停止rabbitmq服务器
  5. rabbitmqctl join_cluster rabbit@emily2 加入集群
  6. rabbitmqctl start_app启动当前节点rabbitmq

GitHub地址:https://github.com/mingyang66/spring-parent

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值