linux centos7 环境下rabbitmqctl status报错
问题:
[[email protected] rabbitMq]# rabbitmqctl list_users
Error: unable to perform an operation on node '[email protected]'. 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 http://rabbitmq.com/documentation.html to learn more
* Consult server logs on node [email protected]
* If target node is configured to use long node names, don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: [[email protected]]
[email protected]:
* connected to epmd (port 4369) on bogon
* epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
* can't establish TCP connection to the target node, reason: timeout (timed out)
* suggestion: check if host 'bogon' resolves, is reachable and ports 25672, 4369 are not blocked by firewall
Current node details:
* node name: '[email protected]'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: mVWZ9hzwnH+BCsNzXPPxQA==
解决办法:
问题出在 “”Error: unable to perform an operation on node '[email protected]'
在 /etc/hosts 文件做一个映射,就将hostname bogon与本机ip映射了一下。保存,source /etc/hosts
然后再次执行rabbitmqctl status就可以了。显示如下所示: