天天看點

安裝部署rabbitmq報錯——已解決

安裝部署rabbitmq時報錯:

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 https://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]:
  * unable to connect to epmd (port 4369) on ramq: badarg (unknown POSIX error)


Current node details:
 * node name: '[email protected]'
 * effective user's home directory: /var/lib/rabbitmq
 * Erlang cookie hash: 562q8brGLPiO0VyesKWViQ==

[[email protected]]# rabbitmqctl status
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 https://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]:
  * unable to connect to epmd (port 4369) on ramq: badarg (unknown POSIX error)


Current node details:
 * node name: '[email protected]'
 * effective user's home directory: /var/lib/rabbitmq
 * Erlang cookie hash: 562q8brGLPiO0VyesKWViQ==
           

原因:rabbitmq主控端無法解析本機的主機名;

解決方式:編輯/etc/hosts檔案,添加主機名映射

編輯後端hosts檔案如下圖所示(主機名為ramq):

安裝部署rabbitmq報錯——已解決

繼續閱讀