[Problem Record] Celery reports an error when connecting to redis: invalid password

Problem record

In the process of using celery to connect to redis, password authentication is used, and an error is reported when executing:
Insert image description here
Using other systems to connect to the test, it is found that the password is correct and the connection can be made, but celery reports an error as soon as it is executed.

problem causes

After looking through a lot of information, I found the problem. You need to add it before the redis password :, otherwise an error will be reported.

solution

Add it before the redis password :and the problem is solved

BROKER_URL = f"redis://:{
      
      redis_password}@{
      
      redis_host}:{
      
      redis_port}/1"

Guess you like

Origin blog.csdn.net/tyty2211/article/details/135396959