RabbitMQ installation Error
Asked Answered
N

4

9

I am installing rabbitMQ on ubuntu16.04. But I am getting below error. I tries searching for it but not able to resolve it.

Adding group `rabbitmq' (GID 131) ...
Done.
Adding system user `rabbitmq' (UID 123) ...
Adding new user `rabbitmq' (UID 123) with group `rabbitmq' ...
Not creating home directory `/var/lib/rabbitmq'.
Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
● rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2018-07-05 12:21:02 IST; 3ms ago
  Process: 9259 ExecStop=/bin/sh -c while ps -p $MAINPID >/dev/null 2>&1; do sleep 1; done (code=exited, status=0/SUCCESS)
  Process: 9107 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
  Process: 8788 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
 Main PID: 8788 (code=exited, status=1/FAILURE)

Jul 05 12:21:02 sumit-precision-7520 systemd[1]: Failed to start RabbitMQ broker.
Jul 05 12:21:02 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Unit entered failed state.
Jul 05 12:21:02 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
dpkg: error processing package rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I run following command.

systemctl status rabbitmq-server.service

Output:

● rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2018-07-05 12:21:26 IST; 8s ago
  Process: 10278 ExecStop=/bin/sh -c while ps -p $MAINPID >/dev/null 2>&1; do sleep 1; done (code=exited, status=0/SUCCESS)
  Process: 10127 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
  Process: 9805 ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server (code=exited, status=1/FAILURE)
 Main PID: 9805 (code=exited, status=1/FAILURE)

Jul 05 12:21:26 sumit-precision-7520 systemd[1]: Failed to start RabbitMQ broker.
Jul 05 12:21:26 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Unit entered failed state.
Jul 05 12:21:26 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.

My host entries are :

127.0.0.1       localhost
127.0.1.1       sumit-precision-7520

Also when I checked this /var/log/rabbitmq/ Path, there is no file in it.

Why I am getting this output. How can I resolve it.

Edit

Output of following commands

CMD: journalctl -xe

-- Unit rabbitmq-server.service has begun starting up.
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: BOOT FAILED
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: ===========
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: Error description:
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    noproc
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: Log files (may contain more information):
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    /var/log/rabbitmq/[email protected]
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    /var/log/rabbitmq/[email protected]
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: Stack trace:
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    [{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {rabbit,ensure_working_log_handlers,0,
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:             [{file,"src/rabbit.erl"},{line,856}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,288}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,424}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {init,start_em,1,[]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {init,do_boot,3,[]}]
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: =INFO REPORT==== 10-Jul-2018::11:29:58.597458 ===
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: Error description:
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    noproc
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: Log files (may contain more information):
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    /var/log/rabbitmq/[email protected]
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    /var/log/rabbitmq/[email protected]
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]: Stack trace:
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:    [{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {rabbit,ensure_working_log_handlers,0,
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:             [{file,"src/rabbit.erl"},{line,856}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,288}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,424}]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {init,start_em,1,[]},
Jul 10 11:29:58 sumit-precision-7520 rabbitmq-server[29523]:     {init,do_boot,3,[]}]
Jul 10 11:29:59 sumit-precision-7520 rabbitmq-server[29523]: {"init terminating in do_boot",noproc}
Jul 10 11:29:59 sumit-precision-7520 rabbitmq-server[29523]: init terminating in do_boot (noproc)
Jul 10 11:29:59 sumit-precision-7520 rabbitmq-server[29523]: [1B blob data]
Jul 10 11:29:59 sumit-precision-7520 rabbitmq-server[29523]: Crash dump is being written to: erl_crash.dump...done
Jul 10 11:29:59 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: Stopping and halting node 'rabbit@sumit-precision-7520'
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: Error: unable to connect to node 'rabbit@sumit-precision-7520': nodedown
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: DIAGNOSTICS
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: ===========
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: attempted to contact: ['rabbit@sumit-precision-7520']
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: rabbit@sumit-precision-7520:
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]:   * connected to epmd (port 4369) on sumit-precision-7520
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]:   * epmd reports: node 'rabbit' not running at all
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]:                   no other nodes on sumit-precision-7520
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]:   * suggestion: start the node
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: current node details:
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: - node name: 'rabbitmq-cli-19@sumit-precision-7520'
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: - home dir: /var/lib/rabbitmq
Jul 10 11:30:00 sumit-precision-7520 rabbitmqctl[29847]: - cookie hash: Yz59fP8Pd/2GV5iaJa/Xng==
Jul 10 11:30:00 sumit-precision-7520 systemd[1]: Failed to start RabbitMQ broker.
-- Subject: Unit rabbitmq-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rabbitmq-server.service has failed.
-- 
-- The result is failed.
Jul 10 11:30:00 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Unit entered failed state.
Jul 10 11:30:00 sumit-precision-7520 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.

CMD: /usr/sbin/rabbitmq-server as root

BOOT FAILED
===========

Error description:
   noproc

Log files (may contain more information):
   /var/log/rabbitmq/[email protected]
   /var/log/rabbitmq/[email protected]

Stack trace:
   [{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
    {gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
    {rabbit,ensure_working_log_handlers,0,
            [{file,"src/rabbit.erl"},{line,856}]},
    {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,288}]},
    {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,424}]},
    {init,start_em,1,[]},
    {init,do_boot,3,[]}]

=INFO REPORT==== 10-Jul-2018::11:33:14.902211 ===
Error description:
   noproc

Log files (may contain more information):
   /var/log/rabbitmq/[email protected]
   /var/log/rabbitmq/[email protected]

Stack trace:
   [{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
    {gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
    {rabbit,ensure_working_log_handlers,0,
            [{file,"src/rabbit.erl"},{line,856}]},
    {rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,288}]},
    {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,424}]},
    {init,start_em,1,[]},
    {init,do_boot,3,[]}]


{"init terminating in do_boot",noproc}
init terminating in do_boot (noproc)

Crash dump is being written to: erl_crash.dump...done

I have also checked for the log file at location /var/log/rabbitmq/[email protected] but no log file is generated.

Edit 2

Installation procedure:

$ wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
$ sudo dpkg -i erlang-solutions_1.0_all.deb
$ sudo apt-get update
$ sudo apt-get install esl-erlang
$ echo "deb http://www.rabbitmq.com/debian/ testing main"  | sudo tee /etc/apt/sources.list.d/rabbitmq.list > /dev/null
$ sudo wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
$ sudo apt-key add rabbitmq-signing-key-public.asc
$ sudo apt-get update
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6B73A36E6026DFCA
$ sudo apt-get update
$ sudo apt-get install rabbitmq-server

Before installing erlang and rabbitmq-server, I have installed LAMP(Apache, Mysql and PHP7.0) and node.js. I have install the same before and it was working fine. I don't understand what I am missing here.

Nematic answered 5/7, 2018 at 7:35 Comment(12)
You have to check the log files in /var/log/rabbitmq to see why RabbitMQ is not starting.Whiz
@LukeBakken Thanks for the response. I have checked for the logs but no log file is created as I have already mentioned in the question.Nematic
What happens when you run /usr/sbin/rabbitmq-server as root?Whiz
Have you tried running journalctl -xe as suggested to see if it contains useful information?Whiz
I have added the output of above command. Still not able to found the problem.Nematic
How did you install the RabbitMQ and Erlang packages? Did you download .deb files, set up apt repositories? Please provide all of the exact commands you ran.Whiz
I have mentioned all the commands above. I have already installed the same on another laptop on Ubuntu 16.04LTS itself. But now don't understand, what I am missing here.Nematic
Everything should be working, so all I can recommend at this point is to uninstall Erlang, RabbitMQ and remove /var/lib/rabbitmq, /var/log/rabbitmq and re-try. If these commands have worked correctly on another Ubuntu system there must be something wrong with the current one.Whiz
I did the same multiple times but found no luck. Still not able to rectify the problem. I have uninstalled everything and reinstalled but still same issue. I have tried it on couple of systems but getting the same error.Nematic
I have fresh installed Ubuntu 16.04LTS and follow the command given above. But got the same error. Error : Not creating home directory `/var/lib/rabbitmq'.Nematic
"deb http://www.rabbitmq.com/debian/ testing main" is not the correct package repository. This is all well-documented here, please re-read it carefully: rabbitmq.com/install-debian.htmlWhiz
It is working fine now. I have updated the package repository. Thanks a lot !Nematic
C
16

You should install RabbitMQ with version that is compatible with version of installed Erlang.

RabbitMQ Erlang version requirements you can find here: https://www.rabbitmq.com/which-erlang.html#compatibility-matrix

  1. To get Erlang version type in Terminal:
erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().'  -noshell
  1. Remove previous RabbitMQ installed:
$ sudo apt-get purge rabbitmq-server
$ sudo rm -fr /var/lib/rabbitmq/
  1. To install appropriate version of RabbitMQ you should do it from repo: https://www.rabbitmq.com/install-debian.html#manual-installation

In my case (Erlang v21) required version of RabbitMQ is 3.7.17:

$ sudo apt-get -y install socat logrotate init-system-helpers adduser
$ cd /opt/tools/
$ sudo wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.17/rabbitmq-server_3.7.17-1_all.deb
$ sudo dpkg -i rabbitmq-server_3.7.17-1_all.deb
$ sudo rm rabbitmq-server_3.7.17-1_all.deb
Charming answered 11/8, 2019 at 12:32 Comment(2)
get erlang packages with right version here : erlang-solutions.com/resources/download.html#tabs-debianLingua
Thanks for this help, this answer must be accepted !Eightfold
O
3

I had exactly the same problem when installed from the repository. Resolved by installing both Erlang and RabbitMQ from the .deb files, according to the manual on the official site: https://www.rabbitmq.com/install-debian.html

Osmious answered 16/7, 2018 at 10:48 Comment(1)
There was a problem with the repository. Somehow it was working earlier. I have updated my repository as suggested by Luke Bakken and it is working now.Nematic
A
0

I have also met with the same error while trying to start service after finishing install using apt-get install method. Followed the documentation in the below url. I could understand that the debain9 installs has the same issue.

https://tecadmin.net/install-rabbitmq-server-debian/

root@rabbitmq:/var/log/rabbitmq# cat startup_log

BOOT FAILED
===========

Error description:
   noproc

Log files (may contain more information):
   /var/log/rabbitmq/[email protected]
   /var/log/rabbitmq/[email protected]

I have managed to resolve the case by following dpkg -i installation steps, Below are the steps I have followed.

apt-get purge rabbitmq-server
apt-get purge erlang
apt-get autoremove
reboot

installation via dpkg method which solved the problem

Dependencies that need to be fixed before dpkg method.

apt-get -y install socat logrotate init-system-helpers adduser
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.15/rabbitmq-server_3.7.15-1_all.deb

/etc/init.d/rabbitmq-server start

And service has started good.

Adactylous answered 21/6, 2019 at 6:46 Comment(0)
E
0

PS:This is probably stale by now but let me just add it for someone who is currently facing this issue.

Ensure that there is no process running on port 5672. This error can be common when you are trying to run multiple message brokers on the same JVM. In my case I had to modify activemq ports and let rabbitmq utilize the default port.

Eroticism answered 22/4, 2022 at 10:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.