RabbitMQ错误:无法连接到节点:nodedown [英] RabbitMQ Error: unable to connect to nodes : nodedown
问题描述
我正在尝试使用两个Rhel实例进行集群.我能够相互ping通,甚至当我尝试使用命令empd -names
时,我也能在4369上启动它并运行它.当我使用命令sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36
时,我也得到了以下错误,以确保我首先是stop_app.
I am trying to do clustering using two Rhel instances. I am able to ping each other and even when i am trying to use command empd -names
, i get it is up and running on 4369.When i am use the command as sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36
i am getting the below error ensuring as well to i am stop_app first..
sudo rabbitmqctl join_cluster rabbit@ip-10-23-20-36
使用'rabbit @ ip-10-23-209-142'群集节点'rabbit @ ip-10-23-20-36'... 错误:无法连接到节点['rabbit @ ip-10-23-209-142']:nodedown
Clustering node 'rabbit@ip-10-23-20-36' with 'rabbit@ip-10-23-209-142' ... Error: unable to connect to nodes ['rabbit@ip-10-23-209-142']: nodedown
试图联系:['rabbit @ ip-10-23-209-142']
attempted to contact: ['rabbit@ip-10-23-209-142']
rabbit @ ip-10-23-209-142: *无法连接到ip-10-23-209-142上的epmd(端口4369):nxdomain(不存在的域)
rabbit@ip-10-23-209-142: * unable to connect to epmd (port 4369) on ip-10-23-209-142: nxdomain (non-existing domain)
当前节点详细信息: -节点名称:"rabbitmq-cli-80 @ ip-10-23-20-36" -主目录:/var/lib/rabbitmq -Cookie哈希:u7nRIpJ40Fd356iLbkDO6Q ==
current node details: - node name: 'rabbitmq-cli-80@ip-10-23-20-36' - home dir: /var/lib/rabbitmq - cookie hash: u7nRIpJ40Fd356iLbkDO6Q==
我已经尝试过的东西:
- 检查cookie名称,使用两个实例在两个实例中都相同
sudo cat /var/lib/rabbitmq/.erlang.cookie
. - 也更改了epmd端口
export ERL_EMPD_PORT=4370
-
netstat -an |grep 4369 | grep -i listen
- 也在插件管理的GUI中更改主机名.
-
还使用
- Checked the cookie name,which is same in both instances using
sudo cat /var/lib/rabbitmq/.erlang.cookie
. - Changed the epmd port as well
export ERL_EMPD_PORT=4370
netstat -an |grep 4369 | grep -i listen
- Changing the hostnames as well in GUI of plugin management.
Changed owner and permission also using
sudo chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
sudo chmod 400 /var/lib/rabbitmq/.erlang.cookie
添加端口
Add port
sudo iptables -I INPUT -p tcp --dport 4369 --syn -j ACCEPT
sudo rabbitmqctl状态
sudo rabbitmqctl status
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
* IP地址是示例地址.
*IP-Adresses are sample adrresses.
推荐答案
如错误消息所述,您的主机名无法解析:
As the error message says, your hostnames do not resolve:
rabbit@ip-10-23-209-142: * unable to connect to epmd (port 4369) on ip-10-23-209-142: nxdomain (non-existing domain)
您需要在DNS或两个主机上的/etc/hosts
中声明这些主机名.然后,您可以使用来测试名称解析是否正常. ping(1):
You need to declare those hostnames in your DNS or in /etc/hosts
on both hosts. You can then test the name resolution is working by using eg. ping(1):
ping ip-10-23-209-142 # from ip-10-23-20-36
这篇关于RabbitMQ错误:无法连接到节点:nodedown的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!