I am using celery and redis as two services in my docker setup. Configuration is as below:
redis:
image: redis:latest
hostname: redis
ports:
- "0.0.0.0:6379:6379"
command:
--requirepass PASSWORD
celeryworker:
<<: *django
depends_on:
- redis
- postgres
command: "celery -E -A rhombus.taskapp worker --beat --scheduler redbeat.schedulers:RedBeatScheduler --loglevel INFO --uid taskmaster --concurrency=5"
When I try to build my containers and schedule some jobs once the workers are ready I get an exception
[2018-03-20 04:40:52,082: WARNING/Beat] redis.exceptions.ResponseError: NOAUTH Authentication required.
I have been unable to figure out what else would be required as configuration to get this setup working. Some insights and guidance into the issue is appreciable.
Below is the complete stack trace.
If you have authentication for redis, then URI should be in this format.
broker_url = 'redis://user:password@redishost:6379/0'
The URI you mentioned is not a valid redis uri. If you update URI, it should work.
Without authentication, uri should be
broker_url = 'redis://redishost:6379/0'
Alternatively, according to the celery docs, if you don't have an explicit user set up, you can set the broker url like this:
broker_url='redis://:password@hostname:port/db_number'
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