安装部署rabbitmq时报错:
Error: unable to perform an operation on node 'rabbit@ramq'. 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@ramq
* If target node is configured to use long node names, don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: [rabbit@ramq]
rabbit@ramq:
* unable to connect to epmd (port 4369) on ramq: badarg (unknown POSIX error)
Current node details:
* node name: 'rabbitmqcli-5339-rabbit@ramq'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: 562q8brGLPiO0VyesKWViQ==
[root@ramqgames]# rabbitmqctl status
Error: unable to perform an operation on node 'rabbit@ramq'. 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@ramq
* If target node is configured to use long node names, don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: [rabbit@ramq]
rabbit@ramq:
* unable to connect to epmd (port 4369) on ramq: badarg (unknown POSIX error)
Current node details:
* node name: 'rabbitmqcli-5415-rabbit@ramq'
* effective user's home directory: /var/lib/rabbitmq
* Erlang cookie hash: 562q8brGLPiO0VyesKWViQ==
原因:rabbitmq宿主机无法解析本机的主机名;
解决方式:编辑/etc/hosts文件,添加主机名映射
编辑后端hosts文件如下图所示(主机名为ramq):