Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django celery: Consumer Connection Error (111) when running python manage.py celeryd

Tags:

django

celery

I am trying to configure a Django project to use Celery (I am using Django 1.3 on Debian Squeeze)

I installed django-celery (2.3.3) and then followed these instructions.

My django celery settings are the following:

BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_USER = "guest"
BROKER_PASSWORD = "guest"
BROKER_VHOST = "/"

When I try to launch the celery worker server with...

$ python manage.py celeryd -l info

I get the following output with a "Consumer: Connection Error: [Errno 111]" at the end :

/home/thomas/virtualenv/ULYSSE/lib/python2.6/site-packages/djcelery/loaders.py:84:     UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments!
warnings.warn("Using settings.DEBUG leads to a memory leak, never "
[2011-09-20 12:14:00,645: WARNING/MainProcess]  

-------------- celery@debian v2.3.3
---- **** -----
--- * ***  * -- [Configuration]
-- * - **** ---   . broker:      amqp://guest@localhost:5672//
- ** ----------   . loader:      djcelery.loaders.DjangoLoader
- ** ----------   . logfile:     [stderr]@INFO
- ** ----------   . concurrency: 1
- ** ----------   . events:      OFF
- *** --- * ---   . beat:        OFF
-- ******* ----
--- ***** ----- [Queues]
--------------   . celery:      exchange:celery (direct) binding:celery


[Tasks]
  . competitions.tasks.add

[2011-09-20 12:14:00,788: INFO/PoolWorker-1] child process calling self.run()
[2011-09-20 12:14:00,795: WARNING/MainProcess] celery@debian has started.
[2011-09-20 12:14:00,809: ERROR/MainProcess] **Consumer: Connection Error: [Errno 111]          Connection refused. Trying again in 2 seconds**...

Apparently, my settings are correctly read (cf. Configuration section in the output) and the worker process is correctly started ("celery@debian has started")

I can not figure out why this "Consumer: Connection Error: [Errno 111]" error appends...

Has this to do with the BROKER_USER and BROKER_PASSWORD settings?

I tried different settings for user/password (my account, root account...) but I always get the same error. Does 'BROKER_USER' and 'BROKER_PASSWORD refer to a OS user, a database user, a "broker" user?

How can I get rid of this Connection Error?

like image 286
tomjerry Avatar asked Sep 20 '11 10:09

tomjerry


1 Answers

Looks like rabbitmq isn't installed or running. Can you check this?

apt-get install rabbitmq-server 

on Ubuntu

like image 175
Fergal Moran Avatar answered Sep 17 '22 10:09

Fergal Moran