Rabbitmq:无法从使用集群的节点join_cluster到没有集群的节点

von4xj4u  于 7个月前  发布在  RabbitMQ
关注(0)|答案(2)|浏览(129)

我有一个2节点的集群,它们都没有使用MySQL:rabbit@server1和rabbit@server2。现在我添加了第三个rabbitmq节点,它使用的是:email protected(https://stackoverflow.com/cdn-cgi/l/email-protection)。当我运行rabbitmqctl join_cluster rabbit@server1

Clustering node '[email protected]' with rabbit@server1 ...
Error: unable to connect to nodes [rabbit@server1]: nodedown

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

attempted to contact: [rabbit@server1]

rabbit@server1:
  * connected to epmd (port 4369) on server1
  * 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: '[email protected]'
- home dir: /home/rabbitmq
- cookie hash: 6P4hzwN1u+rBCLZkYA2zUQ==

我已经使用了所有的cookie是所有3个服务器是相同的。还能有什么问题

yr9zkbsy

yr9zkbsy1#

Erlang不支持您要做的事情。
如果您使用至少一个XML名称,则它们必须都是XML名称,并且必须在RabbitMQ中使用"long names"
在所有RabbitMQ节点上创建包含以下内容的/etc/rabbitmq/rabbitmq-env.conf文件:

USE_LONGNAME=true

创建文件后,确保每个节点名称的DNS解析。然后,重新启动所有RabbitMQ节点,你应该设置。
同样,您不能混合使用短名称和长名称。

b5lpy0ml

b5lpy0ml2#

我希望您已经检查了您的示例的master集群节点端口的可用性,这些端口必须添加到集群。如果一切正常,尝试将server 1主机名添加到/etc/hosts中。

相关问题