3
votes

I am using RabbitMQ server with Django 1.8 on CentOS. When I restart the rabbitmq-server, the operation completes and shows the message "restart ok". But when I see the status it shows following output:

Starting node rabbit@bynrySystem ...
Error: unable to connect to node rabbit@bynrySystem: nodedown

DAIGNOSTICS
===========

attempted to contact: [rabbit@bynrySystem]

rabbit@bynrySystem:
  * connected to epmd (port 4369) on bynrySystem
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on bynrySystem
  * suggestion: start the node

current node details:
- node name: 'rabbitmq-cli-59@bynrySystem'
- home dir: /var/lib/rabbitmq
- cookie hash: f/MoFCCKTONVCYhIDLxvew==

When I run a task it gives following error.

consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
2

2 Answers

0
votes

A common cause for this error is that the cookie hash is incorrectly set after a shutdown. If you don't have any valuable data or definitions in your RabbitMQ node, just stop the service and remove /var/lib/rabbitmq/*, then start it back.

sudo rm -rf /var/lib/rabbitmq/*

This resets the node, so it deletes all messages.

0
votes

What worked for me was the rabbitmqctl reset

rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app
rabbitmqctl list_users

resulted in

Listing users ...
guest   [administrator]

ref enter link description here

This will work for the default configuration. However, seems a better practice to create a vhost with user with permissions to access that vhost.