如何解决rabbitmq TCP连接成功,但Erlang分发失败
加入集群时出现错误消息
root@hostname02:~# rabbitmqctl join_cluster --longnames rabbit@hostname01
Error: unable to perform an operation on node 'rabbit@hostname02'. 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@hostname02
* If target node is configured to use long node names,don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: ['rabbit@hostname02']
rabbit@hostname02:
* connected to epmd (port 4369) on hostname02
* epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
* TCP connection succeeded but Erlang distribution failed
* Node name (or hostname) mismatch: node "rabbit@hostname02" believes its node name is not "rabbit@hostname02" but something else.
All nodes and CLI tools must refer to node "rabbit@hostname02" using the same name the node itself uses (see its logs to find out what it is)
Current node details:
* node name: 'rabbitmqcli-7548-rabbit@hostname02'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: Uaa+OhOna5fm+J0oPGPAiw==
root@hostname02:~#
两个服务器上的 .erlang.cookie
相同。
我看不到我在这里想念的东西。有人可以解决吗?
解决方法
选中--longnames
选项。如果主机部分中有点,则Erlang节点(及其分配协议)仅需要长名称。
此外,在启动时检查RabbitMQ报告的节点名称,并验证其是否与rabbit@hostname02
匹配
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。