rabbitmq refusing to start

Solution 1:

Rabbitmq is set to start automatically after it's installed. I don't think it is configured run with the service command.

To see the status of rabbitmq

sudo rabbitmqctl status

To stop the rabbitmq

sudo rabbitmqctl stop

(Try the status command again to see that it's stopped). To start it again, the recommended method is

sudo invoke-rc.d rabbitmq-server start

These all work with the vanilla ubuntu install using apt-get

Still not working?

If you've tried unsuccessfully to start or restart rabbitmq, check to see how many processes are running.

ps -ef | grep rabbit

There should be 5 processes running as the user rabbitmq. If you have more, particularly if they're running as other users (such as root, or your own user) you should stop these processes.

The cleanest way is probably to reboot your machine.

Solution 2:

rabbitmq-server refuses to start if the hostname -s value has changed.

The solution suggested here is only for test/development environments.

I had to delete the database to fix it locally. i.e empty folder /var/lib/rabbitmq (ubuntu) or /usr/local/var/lib/rabbitmq/(mac)

Solution 3:

I had similar problem but these suggestions didn't work for me(restart too). When I run rabbitmq-server command, I get a response like that:

$/ rabbitmq-server


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

Error description:
   {error,{cannot_log_to_file,"/var/log/rabbitmq/[email protected]",
                              {error,eacces}}}
....

When I checked permissions of /var/log/rabbitmq/[email protected] file, I saw that group has not write permisson for that file. So I gave permission to group with that command:

/var/log/rabbigmq/$ chmod g+w *

then problem has gone!

Maybe this answer help someone.

Solution 4:

Seems like the Mnesia database was corrupted. Had to delete it to get sudo service rabbitmq-server start going again !

$ sudo rm -rf /var/lib/rabbitmq/mnesia/

Also make sure that any stray rabbit processes are killed before clearing out

$ ps auxww | grep rabbit | awk '{print $2}' | sudo xargs kill -9

And then

$ sudo service rabbitmq-server start