当前位置:   article > 正文

rabbitMQ集群异常_unable to connect to epmd

unable to connect to epmd

执行命令:

unable to connect to epmd (port 4369) on vm-246: nxdomain (non-existing domain)

rabbitmqctl join_cluster rabbit@hostname1

异常信息:

unable to connect to epmd (port 4369) on vm-246: nxdomain (non-existing domain)

原因分析:

由于不能解析hostname1

解决办法:
/etc/hosts 中把各个主机节点的hostname 加上

 

问题一: 

这里写图片描述
sudo rabbitmqctl join_cluster --ram rabbit@rabbitmq-node1
Clustering node rrabbit@rabbitmq-node1 with rabbit@rabbitmq-node1...
Error: unable to connect to nodes rabbit@rabbitmq-node1]: nodedown

DIAGNOSTICS
===========
attempted to contact: [rabbit@rabbitmq-node1]
rabbit@rabbitmq-node1:
  * unable to connect to epmd (port 4369) on rabbitmq-node1: nxdomain (non-existing domain)
current node details:
- node name: 'rabbitmqctl-526rabbitmq-node1'
- home dir: /var/lib/rabbitmq
- cookie hash: 50YO3zK+HJHos0tab1vHjg==


解决之道: 
集群节点间需能互相访问,故每个集群节点的hosts文件应包含集群内所有节点的信息以保证互相解析

vim /etc/hosts
1 IP    rabbit@rabbitmq-node1
2 IP    rabbit@rabbitmq-node2
3 IP    rabbit@rabbitmq-node3

之后重启各节点中的rabbitmq

 

问题二:

cluster搭建起来后若在web管理工具中rabbitmq_management的Overview的Nodes部

“Node statistics not available”
1
说明在该节点上web管理插件还未启用。

直接在显示提示信息的节点上运行

 rabbitmq-plugins enable rabbitmq_management
Error: mnesia_unexpectedly_running

原因:忘记先停止stop_app 
解决:

rabbitmqctl stop_app


问题三:

这里写图片描述

[rabbit@rabbitmq-node2 ~]$ sudo rabbitmqctl start_app
Starting node rabbit@rabbitmq-node2 ...
BOOT FAILED
===========
Error description:
   {error,{inconsistent_cluster,"Node rabbit@rabbitmq-node1  thinks it's clustered with node rabbit@rabbitmq-node1, but rabbit@rabbitmq-node2 disagrees"}}
Log files (may contain more information):
   /var/log/rabbitmq/rabbit@VMS00782.log
   /var/log/rabbitmq/rabbit@VMS00782-sasl.log
Stack trace:
   [{rabbit_mnesia,check_cluster_consistency,0},
    {rabbit,'-start/0-fun-0-',0},
    {rabbit,start_it,1},
    {rpc,'-handle_call_call/6-fun-0-',5}]
Error: {rabbit,failure_during_boot,
           {error,
               {inconsistent_cluster,
                   "Node rabbit@rabbitmq-node2 thinks it's clustered with node rabbit@rabbitmq-node1, but rabbit@rabbitmq-node2 disagrees"}}}

需要重置一下

[rabbit@rabbitmq-node2~]$  rabbitmqctl reset
Resetting node rabbit@rabbitmq-node2 ...
[rabbit@rabbitmq-node2~]$ rabbitmqctl start_app
Starting node rabbit@rabbitmq-node2 ...


问题四:

这里写图片描述

 

[root@redid-server01 mnesia]# rabbitmqctl join_cluster rabbit@rabbitmq-node2
Clustering node 'rabbit@redid-server01' with 'rabbit@rabbitmq-node2' ...
Error: {corrupt_or_missing_cluster_files,{error,enoent},{error,enoent}}

参考文档: 
http://www.rabbitmq.com/clustering.html
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/869968
推荐阅读
相关标签
  

闽ICP备14008679号