启动的时候报错。。。。。。我了去。各种百度也没弄出啥了。最后还是看报错信息解决。
一、问题描述
安装完mq之后启动报错,查看状态也是一直是什么cooki,
[root@syld36 mnesia]# /etc/init.d/rabbitmq status Status of node rabbit@syld36 ... Error: unable to perform an operation on node 'rabbit@syld36'. 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@syld36 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools DIAGNOSTICS =========== attempted to contact: [rabbit@syld36] rabbit@syld36: * connected to epmd (port 4369) on syld36 * 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 'syld36' resolves, is reachable and ports 25672, 4369 are not blocked by firewall Current node details: * node name: 'rabbitmqcli-255314-rabbit@syld36' * effective user's home directory: /root * Erlang cookie hash: GoBfPtMOwQFWNwGIjvTJJA==
二、解决方法
我先说解决办法:
在/etc/hosts 中增加一条 :127.0.0.1 syld36 syld36 这是机器的主机名 就解决了
解决思路: 再错错误日志中,有一段“检查主机syld36是否解析”!!! 我就试着解析一下,还真成功了。哎。。。。遇到问题还是要看报错提示呀!!!!
查看服务器主机名 hostname
三、查看mq状态
/etc/init.d/rabbitmq status
这是安装mq的文章,/etc/init.d/rabbitmq 的启动脚本在下面这个文章中。