安装好rabbitmq后,然后用rabbitmqctl start_app或者启动都是报错,报错如下
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]:

  • connected to epmd (port 4369) on hecs-x-medium-2-linux-20200622172450
  • epmd reports: node ‘rabbit’ not running at all
    no other nodes on hecs-x-medium-2-linux-20200622172450
  • suggestion: start the node

Current node details:

  • node name: ‘[email protected]
  • effective user’s home directory: /root
  • Erlang cookie hash: vVAgrz18VW8gDZQB2YRW8A==

实际上这有可能是因为我们停止的时候进程并未完全关闭或者是被其他应用占用,导致后续重启失败,rabbitmq没有启动.

Rabbitmq-server默认占用的端口号有:5672、15672、25672、4369
命令查看这几个端口的进程情况:
netstat -tunlp|grep 15672
netstat -tunlp|grep 5672
netstat -tunlp|grep 25672
netstat -tunlp|grep 4369
rabbitmq启动报错
发现5672,4369这个两个端口的确被进程占用
然后kill - 9 16996
kill - 9 2464

然后重新再启动就可以了
rabbitmq启动报错

相关文章: