Reputation: 3666
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.
Upvotes: 56
Views: 117943
Reputation: 1534
Not sure if it's related, but in my case configuring proper node name helped me after upgrading.
My error message was confusing at least:
Error trying to stop RabbitMQ: :throw:{:error, {:missing_dependencies, [:eldap], [:rabbitmq_auth_backend_ldap]}}
In Ubuntu 22.04 configuration file is /etc/rabbitmq/rabbitmq-env.conf
with default (commented out) value:
#NODENAME=rabbit
I set to the node name I used before upgrading, that is s1
:
NODENAME=s1
After this fix, the server started instantly:)
Upvotes: 0
Reputation: 13710
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
Upvotes: 12
Reputation: 173
My brew version of rabbitmq refused to start (after working fine for years without modification by me) too.
$ cat /usr/local/etc/rabbitmq/rabbitmq-env.conf
CONFIG_FILE=/usr/local/etc/rabbitmq/rabbitmq
NODE_IP_ADDRESS=127.0.0.1
NODENAME=rabbit@localhost
RABBITMQ_LOG_BASE=/usr/local/var/log/rabbitmq
I edited out rabbit@
on NODENAME
and brew services restart rabbitmq
started working again.
Upvotes: 2
Reputation: 347
If the standard stop and start are not working, list the rabbitmq processes that are running using
ps aux | grep rabbitmq
Kill the beam.smp process using
kill -9 {process id}
and start the rabbitmq-server again.
Upvotes: 0
Reputation: 2382
Have a look what is in the log of the node that you are trying to start. It will be in /var/log/rabbitmq/ It was selinux in my case, rabbit could not bind to its ports.
Upvotes: 1
Reputation: 2856
If you use celery, your queues could reach max size and rabbit won't start because of that. Maybe you wouldn't even able to use rabbitmqctl
, so if you can afford to clean the queues, just remove
/var/lib/rabbitmq/mnesia/rabbit@<host>/queues
on unix (look for mnesia DB path on your system). Be careful: this will remove everything you have in rabbit, so this is a last solution ever.
Upvotes: 4
Reputation: 10753
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)
Upvotes: 15
Reputation: 8545
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.
Upvotes: 10
Reputation: 8969
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.
Upvotes: 74