I had a rabbit-mq service running and I suddenly see that the service is not running and that I cannot start it.

I have checked other existing questions regarding this kind of problems, and most of them point to problems in /etc/hosts configuration

The result of restart is:

/etc/init.d/rabbitmq-server restart

[....] Restarting rabbitmq-server (via systemctl): rabbitmq-server.serviceJob for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.


And the detail in systemctl is:

systemctl status rabbitmq-server.service
rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since mié 2018-10-03 13:07:32 CEST; 42s ago
Process: 5545 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=2)
Process: 4564 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=2)
Process: 4563 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 4563 (code=exited, status=1/FAILURE)

systemd[1]: Starting RabbitMQ Messaging Server...
rabbitmq[4564]: Waiting for rabbit@edr ...
rabbitmq[4564]: pid is 4571 ...
systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
rabbitmq[4564]: Error: process_not_running
systemd[1]: rabbitmq-server.service: Control process exited, code=exited status=2
systemd[1]: Failed to start RabbitMQ Messaging Server.
systemd[1]: rabbitmq-server.service: Unit entered failed state.
systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.

The result of journalctl -xe gives not much more info.

And the file /var/log/rabbitmq/startup_err shows a message truncated like this:

Crash dump is being written to: erl_crash.dump...done
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Cookie file /var/lib/rabbitmq/.erl
tail: /var/log/rabbitmq/startup_err: file truncated

Is there another way to find the exact error when rabbit-mq fails to start?


Finally I found the detailed error in /var/log/rabbitmq/startup_log which says:

{error_logger,{{2018,10,3},{13,14,18}},“Cookie file /var/lib/rabbitmq/.erlang.cookie must be accessible by owner only”,[]}

I thought it would be better to let rabbitmq create a fresh file, so the solution applied was to remove the erlang cookie file:

rm /var/lib/rabbitmq/.erlang.cookie

After that, restarting rabbitmq makes it work again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.