I am using django-celery for my django project. Last day I have changed my computer's hostname (I am using Ubuntu 12.04, edited file '/etc/hostname'), and after next restart django-celery was failing with error
Consumer: Connection Error: [Errno 111] Connection refused. Trying again in 4 seconds...
After some research on this error I could find that, changing my host name caused this error from here. My rabbitmq startup log shows
file: /var/log/rabbitmq/startup_log
Activating RabbitMQ plugins ...
********************************************************************************
********************************************************************************
0 plugins activated:
ERROR: epmd error for host "jinesh": nxdomain (non-existing domain)
My startup_err file is empty.
when I run
root@jinesh:/home/jinesh# rabbitmqctl list_users
Listing users ...
Error: unable to connect to node rabbit@jinesh: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@jinesh]
hosts, their running nodes and ports:
- unable to connect to epmd on jinesh: nxdomain
current node details:
- node name: rabbitmqctl4956@jinesh
- home dir: /var/lib/rabbitmq
- cookie hash: RGhmB2JR1LbZ57j7xWWTxg==
I hope changing the nodename may fix this issue. But I couldn't found a way to do this. Anyone have idea about how solve this issue?
update
while changing hostname you have to change both /etc/hostname
and /etc/hosts
files.
I reinstalled rabbitmq and solved this issue, Will answer this question.
rabbitmqctl status
"unable to connect to epmd". --> The fix is the same as the accepted answer by @RichardHFung for this question. – Headstone