Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rabbitmq refusing to start

Tags:

rabbitmq

I have installed rabbitmq on ubuntu and trying to start it using rabbitmq-server start, however, I'm getting this error:

Activating RabbitMQ plugins ...  0 plugins activated:  node with name "rabbit" already running on "mybox"  diagnostics:  - nodes and their ports on mybox: [{rabbit,38618},                                        {rabbitmqprelaunch13346,41776}] - current node: rabbitmqprelaunch13346@mybox - current node home dir: /var/lib/rabbitmq - current node cookie hash: 8QRKGluOJOcZ4AAkEdFwQg== 

so I try to stop it or restart it using service rabbitmq-server restart but I get the following error: Restarting rabbitmq-server: RabbitMQ is not running

The server's host name hostname -s is mybox.

How do I stop the currently running instance, or at least, how do I manage it? I have no access to it and yet I'm not able to run rabbitmq properly.

Thank you.

like image 260
Ali Avatar asked Apr 27 '12 08:04

Ali


People also ask

Why is RabbitMQ not starting?

Make sure the node is running using rabbitmq-diagnostics status. Verify config file is correctly placed and has correct syntax/structure. Inspect listeners using rabbitmq-diagnostics listeners or the listeners section in rabbitmq-diagnostics status. Inspect effective configuration using rabbitmq-diagnostics environment.

How do I start RabbitMQ when it crashes due to insufficient space?

Resolving The Problem. Remove the file /var/lib/rabbitmq/mnesia/rabbit@host-name/recovery. dets if the size is 0 and restart RabbitMQ by running 'systemctl start rabbitmq-server.

How do you troubleshoot RabbitMQ?

You can troubleshoot RabbitMQ by viewing the log files under the Roaming AppData. Additionally, you can use the RabbitMQ management UI to view information about the topics and subscriptions used for distributing messages. This page contains the following information: RabbitMQ logging/service management.


2 Answers

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.

like image 167
GregHNZ Avatar answered Sep 26 '22 03:09

GregHNZ


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)

like image 21
Venkat Kotra Avatar answered Sep 23 '22 03:09

Venkat Kotra