Question

I'm having some problems using Celery. I´m using this configuration:

Redis 2.8.0
Celery 3.1.1
Python 2.7.3
django-celery 3.1.1
django 1.5.5.

All using virtualenv and Ubuntu 12.04.

The configuration of my settings.py is:

import djcelery
djcelery.setup_loader()

BROKER_URL = "redis://127.0.0.1:6379/0"
# Redis setup
REDIS_HOST = "127.0.0.1"
REDIS_PORT = 6379
REDIS_DB = 0
REDIS_CONNECT_RETRY = True
CELERY_SEND_EVENTS = True
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'
CELERY_TASK_RESULT_EXPIRES = 60

CELERY_ALWAYS_EAGER = False

My tasks are enqueued on Redis correctly on the server. I add a task and then I check Redis queue confirming that it´s been added. If I "delay" the task, all is nominal.

shell> redis-cli
redis 127.0.0.1:6379> LLEN celery
5  # tasks enqueued

Then, the problem comes. After I launch the worker, and using supervisor, I never see the process launched in ps aux. So I tried it manually like:

> bin/python manage.py celeryd -l debug

[2013-11-13 11:14:41,419: DEBUG/MainProcess] | Worker: Preparing bootsteps.
[2013-11-13 11:14:41,421: DEBUG/MainProcess] | Worker: Building graph...
[2013-11-13 11:14:41,422: DEBUG/MainProcess] | Worker: New boot order: {Timer, Hub, Queues (intra), Pool, Autoreloader, StateDB, Autoscaler, Beat, Consumer}
[2013-11-13 11:14:41,426: DEBUG/MainProcess] | Consumer: Preparing bootsteps.
[2013-11-13 11:14:41,426: DEBUG/MainProcess] | Consumer: Building graph...
[2013-11-13 11:14:41,428: DEBUG/MainProcess] | Consumer: New boot order: {Connection, Events, Gossip, Mingle, Control, Heart, Tasks, Agent, event loop}

And that's it. It never reaches the beautiful C of Celery in ASCII art. And there's no more log.

I'm not sure what's the next step I need to do right now. I run this locally and everything works like a charm (locally I´m using Mac OS X) but on the server it won't comply.

Thanks a lot in advance!

Was it helpful?

Solution

Sorry for the late answer.

The problem was that I was using root as the user, so it was giving permission problems while executing.

It was simply solved by using a different user than root.

Hope this can help someone else having the same problem!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top