rabbitmqctl status报错
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rabbitmqctl status报错相关的知识,希望对你有一定的参考价值。
今天第二次部署rabbitmq,第一次部署之后早都没有印象了,哎,好无奈,不过依然对rabbitmq不懂,但是先部署好吧。流程这里先不写了,先记录一个问题吧,看见网上大家的这个问题很少见,给需要的小伙伴一个参考吧,可能大家不写是觉得问题简单所以不屑一顾了,但是我这个菜鸟渣渣还得记录一下。安装好之后启动了rabbitmq,查看状态报错如下:
[[email protected] ~]# rabbitmqctl status
Status of node [email protected] ...
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]
DIAGNOSTICS
attempted to contact: [[email protected]]
- connected to epmd (port 4369) on nginx
- 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 ‘nginx‘ resolves, is reachable and ports 25672, 4369 are not blocked by firewall
Current node details:
- node name: [email protected]
- effective user‘s home directory: /root
- Erlang cookie hash: 5xhHO3pWlZKxcLJlQY+zUA==
原因:
自己修改了主机名,所以需要在hosts文件中做解析。
解决办法:
[[email protected] ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 nginx
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
再查看状态,好了。
[[email protected] ~]# rabbitmqctl status
Status of node [email protected] ...
[{pid,12301},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.7.7"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.7.7"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.7.7"},
{rabbit,"RabbitMQ","3.7.7"},
{amqp_client,"RabbitMQ AMQP Client","3.7.7"},
{rabbit_common,
"Modules shared by rabbitmq-server and rabbitmq-erlang-client",
"3.7.7"},
{recon,"Diagnostic tools for production use","2.3.2"},
.
.
.
.
安装过程见word文档,同时有安装脚本。此留作记录。201808082209
以上是关于rabbitmqctl status报错的主要内容,如果未能解决你的问题,请参考以下文章
Windows XP 上的 rabbitmqctl.bat:无法连接到节点 rabbit@MYPCNAME:nodedown