Issue
Following a
sudo apt-get install rabbitmq-server
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)
That's in systemctl status
. In 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'.
Solution
OK, this was a rough one:
Make sure your hostname is correct. you can run
sudo hostname --file /etc/hostname
to make sure. If it isn't change it by changing
/etc/hostname
.a.b.c.d
should be enough.If you're behind a company firewall
rabbitmq
will fail to connect to all the interfaces. Change/etc/rabbitmq/rabbitmq-env.conf
, settingNODE=rabbit@localhost
. This is enough for development.
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.
Answered By - kabanus Answer Checked By - Mary Flores (WPSolving Volunteer)