RabbitMQ在Debian Stretch上安装/启动失败

时间:2017-07-26 13:12:18

标签: rabbitmq debian

关注

sudo apt-get install rabbitmq-server

我在服务尝试启动时遇到错误(同样在使用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 status。在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 个答案:

答案 0 :(得分:3)

好的,这是一个粗略的问题:

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

    sudo hostname --file / etc / hostname

    确保。如果它没有通过更改/etc/hostname来更改它。 a.b.c.d应该足够了。

  2. 如果您在公司防火墙后面rabbitmq将无法连接到所有接口。更改/etc/rabbitmq/rabbitmq-env.conf,设置NODE=rabbit@localhost。这足以促进发展。

  3. 现在您可以sudo apt-get install --fix-broken完成安装(会抱怨它已安排更多的东西)。使用sudo rabbitmqctl status确保节点正常运行 - 如果没有,它会清楚地说明。