Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery node fail, on pidbox already using on restart

I have Celery running with RabbitMQ broker. Today, I have a failure of a Celery node, it doesn't execute tasks and doesn't respond on service celeryd stop command. After few repeats, the node stopped, but on start I get this message:

[WARNING/MainProcess] celery@nodename ready.
[WARNING/MainProcess] /home/ubuntu/virtualenv/project_1/local/lib/python2.7/site-packages/kombu/pidbox.py:73: UserWarning: A node named u'nodename' is already using this process mailbox!

Maybe you forgot to shutdown the other node or did not do so properly?
Or if you meant to start multiple nodes on the same host please make sure
you give each node a unique node name!

  warnings.warn(W_PIDBOX_IN_USE % {'hostname': self.hostname})

Can anyone suggest how to unlock process mailbox?

like image 487
Jamal Avatar asked Sep 07 '13 12:09

Jamal


1 Answers

From here http://celery.readthedocs.org/en/latest/userguide/workers.html#starting-the-worker you might need to name each node uniquely. Example:

$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker1.%h

In supervisor escape by using %%h.

like image 88
f01 Avatar answered Oct 01 '22 13:10

f01