Reputation: 10893
I keep on getting the error message: redis.exceptions.ResponseError: NOAUTH Authentication required.. (I'm using celery to perform background tasks).
My settings.py looks like this:
CELERY_BROKER_URL = 'redis://user:my_strong_password@'+REDIS_IP+':6379/0'
the docker-compose I have:
services:
redis:
image: redis:latest
container_name: jh_redis
ports:
- '6379:6379'
command: redis-server --appendonly yes --requirepass my_strong_password
you can see that my attempt to provide the password (--requirepass) is exactly as it shown in the settings.py however, while the docker is up and running I still get the subject error message.
I have tried different combination such as:
--requirepass user:my_strong_password
but still didn't work. Note: when I take off the entire command line - it works (but 32 hours after - I get the error message and it stop working).
What should be the appropriate settings in docker-compose to have it work smoothly?
Upvotes: 2
Views: 14958
Reputation: 15966
According to the celery docs, your broker url should be in this format:
redis://:password@hostname:port/db_number
i.e., you should remove user
from the broker_url.
Upvotes: 9