本文介绍了RabbitMQ在Debian Stretch上安装/启动失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

跟随

sudo apt-get install rabbitmq-server

服务尝试启动时(也使用 systemctl start )时出现错误:

I'm hitting errors when the service attempts to start (also when using systemctl start):

● rabbitmq-server.service - RabbitMQ Messaging Server
  Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
  Active: failed (Result: exit-code) since Wed 2017-07-26 15:59:41 IDT; 4min 28s ago
  Process: 17895 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=70)
  Process: 17894 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
 Main PID: 17894 (code=exited, status=1/FAILURE)

处于 systemctl状态。在 journalctl -xe 中:

-- Unit rabbitmq-server.service has begun starting up.
Jul 26 15:59:37 myhost rabbitmq[17895]: Waiting for rabbit@myhost ...
Jul 26 15:59:37 myhost rabbitmq[17895]: pid is 17903 ...
Jul 26 15:59:40 myhost systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
Jul 26 15:59:41 myhost rabbitmq[17895]: Error: process_not_running
Jul 26 15:59:41 myhost systemd[1]: rabbitmq-server.service: Control process exited, code=exited status=70
Jul 26 15:59:41 myhost systemd[1]: Failed to start RabbitMQ Messaging Server.
-- Subject: Unit rabbitmq-server.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit rabbitmq-server.service has failed.
--
-- The result is failed.
Jul 26 15:59:41 myhost systemd[1]: rabbitmq-server.service: Unit entered failed state.
Jul 26 15:59:41 myhost systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.


推荐答案

好的,这很粗糙:


  1. 确保您的主机名正确。您可以运行

  1. Make sure your hostname is correct. you can run

sudo主机名--file / etc / hostname

sudo hostname --file /etc/hostname

来确保。如果没有更改,请更改 / etc / hostname abcd 应该足够了。

to make sure. If it isn't change it by changing /etc/hostname. a.b.c.d should be enough.

如果您位于公司防火墙的后面 rabbitmq 将无法连接到所有接口。更改 /etc/rabbitmq/rabbitmq-env.conf ,设置 NODE = rabbit @ localhost

If you're behind a company firewall rabbitmq will fail to connect to all the interfaces. Change /etc/rabbitmq/rabbitmq-env.conf, setting NODE=rabbit@localhost. This is enough for development.

现在,您可以 sudo apt-get install --fix -破碎以完成安装(会抱怨说它预定了更多的东西)。使用 sudo rabbitmqctl status 来确保节点正常运行-如果没有,它将清楚地表明。

Now you can sudo apt-get install --fix-broken to complete the installation (will complain it was scheduled for more stuff). Use sudo rabbitmqctl status to make sure the node is properly running - it will say it clearly if not.

这篇关于RabbitMQ在Debian Stretch上安装/启动失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 22:10