10

I am using celery for django which needs rabbitmq. Some 4 or 5 months back, it used to work well. I again tried using it for a new project and got below error for rabbitmq while listing queues.

Listing queues ...
Error: unable to connect to node 'rabbit@somename': nodedown
diagnostics:
- nodes and their ports on 'somename': [{rabbitmqctl23014,44910}]
- current node: 'rabbitmqctl23014@somename'
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: XfMxei3DuB8GOZUm1vdUsg==

Whats the solution? If there is no good solution, can I uninstall and reinstall rabbitmq ?

nalply
  • 26,770
  • 15
  • 78
  • 101
user2139745
  • 1,721
  • 4
  • 19
  • 30

4 Answers4

36

I had installed rabbit as a service apparently and the

sudo rabbitmqctl force_reset 

command was not working.

sudo service rabbitmq-server restart 

Did exactly what I need.

P.S. I made sure I was the root user to do the previous command

sudo su
RachelD
  • 4,072
  • 9
  • 40
  • 68
7

if you need change hostname:

sudo aptitude remove rabbitmq-server
sudo rm -fr /var/lib/rabbitmq/

set new hostname:

hostname newhost

in file /etc/hostname set new value hostname

add to file /etc/hosts

127.0.0.1 newhost

install rabbitmq:

sudo aptitude install rabbitmq-server

done

iqmaker
  • 2,162
  • 25
  • 24
2

Check if the server is running by using this command:

sudo service rabbitmq-server status

If it says

Status of all running nodes...

Node 'rabbit@ubuntu' with Pid 26995:

running done.

It's running.

In my case, I accidentally ran the rabbitmqctl command with a different user and got the error you mentioned.

You might have installed it with root, try running

sudo rabbitmqctl stop_app

and see what the response is.

(If everything's fine, run sudo rabbitmqctl start_app afterwards).

Community
  • 1
  • 1
Northern Pole
  • 169
  • 2
  • 12
-2
  • Double check that your cookie hash file is the same
  • Double check that your machine name (uname) is the same as the one stated in your configuration — this one can be tricky
  • And double check that you start rabbitmq with the same user as the one you installed it. Just using 'sudo' won't do the trick.