64

Rabbitmq server does not start, saying it's already running:

$: rabbitmq-server
Activating RabbitMQ plugins ...
0 plugins activated:

node with name "rabbit" already running on "android-d1af002161676bee"
diagnostics:
- nodes and their ports on android-d1af002161676bee: [{rabbit,52176},
                                                      {rabbitmqprelaunch2254,
                                                       59205}]
- current node: 'rabbitmqprelaunch2254@android-d1af002161676bee'
- current node home dir: /Users/Jordan
- current node cookie hash: ZSx3slRJURGK/nHXDTBRqQ==

But, rabbitmqctl seems to think otherwise:

rabbitmqctl -n rabbit status
Status of node 'rabbit@android-d1af002161676bee' ...
Error: unable to connect to node 'rabbit@android-d1af002161676bee': nodedown
diagnostics:
- nodes and their ports on android-d1af002161676bee: [{rabbit,52176},
                                                      {rabbitmqctl2462,59256}]
- current node: 'rabbitmqctl2462@android-d1af002161676bee'
- current node home dir: /Users/Jordan
- current node cookie hash: ZSx3slRJURGK/nHXDTBRqQ==

Any takers?

Jordan Warbelow-Feldstein
  • 10,510
  • 12
  • 48
  • 79

9 Answers9

74

The rabbitmq server was running somewhere but it just couldn't be connected to.

One of the following will mention something about rabbits:

$: ps aux | grep epmd
$: ps aux | grep erl

Kill the process with kill -9 {pid of rabbitmq process}

Jordan Warbelow-Feldstein
  • 10,510
  • 12
  • 48
  • 79
50

i was having the same problem then I realized I was not issuing the right command.

./rabbitmqctl stop 

this works everytime, although it does take down erlang runtime too. also mind where your config file.

baskint
  • 692
  • 5
  • 12
  • 1
    this is a much more elegant solution than the kill suggested above IMO – Gaston Oct 26 '15 at 19:34
  • Thanks - to get this to work issue the following command 'rabbitmqctl stop' into command prompt and then issue 'rabbitmq-server' to restart the server. – Simon Nov 12 '15 at 17:29
27

I used rabbitmqctl stop and then restarted using rabbitmq-server as root.

user7897287
  • 379
  • 3
  • 8
20

This issue can be caused by two issues:

  1. Rabbit is already running on the server. If that is the case, use the answer you found of killing the currently running process (ps aux | grep rabbit | grep -v grep)
  2. You have changed the IP address of your machine but not changed the /etc/hosts file to reflect the new IP address of the machine.

The more common of the issues is the first, but the harder to find is the second (especially if you have rabbit running on the other machine. If rabbit is installed on the other machine it will look at the old IP address and would see another machine already running rabbitmq and give you the same error. This has caused me grief in the past.

basickarl
  • 37,187
  • 64
  • 214
  • 335
hazmat
  • 640
  • 5
  • 12
  • 3
    Yeah that /etc/hosts gets me every time. So for everyone else, make sure the /etc/hosts file contains the name of your server e.g. "127.0.0.1 server2452 server2452.site.com" – byoungb Aug 07 '13 at 13:12
7

I was having this same error @ Win 7, but the solutions above did not worked for me, what did solved was to remove and reinstall the service. Using a console with admin rights:

rabbitmq-service remove

rabbitmq-service install

I hope this might help someone else too

Richard
  • 640
  • 7
  • 13
2

$CD RabbitMQ Server\rabbitmq_server-3.7.8\sbin

rabbitmq-service remove

rabbitmq-service install

Go : windows Services Find : RabbitMQ and Start it

after this Enable plugin :

rabbitmq-plugins enable rabbitmq_management

ZURA Tikaradze
  • 279
  • 5
  • 15
1

In my case under Ubuntu 11.10 it helped to

#rabbitmqctl cluster MASTER SLAVE
#rabbitmqctl start_app

before I always got this error message...

patroqueeet
  • 764
  • 1
  • 8
  • 19
0

Using admin console, in Win 2012R2 ver 3.5.5 rabbit, got it to work using the remove and install then rabbitmq-server restart then ctr-c to terminate the job, then I was able to use the windows service console and start the rabbitMq service.

-1

In my case(windows), 1. I just ran the stop service. 2. The started the service.

SRI RaMan
  • 11
  • 3