I tried to search the relative questions on stackoverflow and on google but didn't find something which could solve my issue.
I have BROKER_URL set in my /etc/default/celeryd configuration as redis. BROKER_URL="redis://localhost:6379"
But when I start /etc/init.d/celeryd start
it says: "ERROR/MainProcess] consumer: Cannot connect to amqp://[email protected]:5672//:"
Also on the docs page I saw about celeryconfig.py. I don't understand why should I have two config files? /etc/default/celeryd is there for configuration.
You can try CELERY_BROKER_URL instead of BROKER_URL if you set the namespace like app.config_from_object("django.conf:settings", namespace="CELERY").
Ref: http://docs.celeryproject.org/en/latest/history/whatsnew-4.0.html#latentcall-django-admonition
Make sure you're not setting broker when defining your app. This one bit me when I copied and pasted code from the tutorial. It took me hours to realize I was overriding my own configuration with this line:
app = Celery('tasks', broker='amqp://guest@localhost//')
It should say this:
app = Celery('tasks')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With