HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

WRONGPASS invalid username-password pair or user is disabled when connect to redis 6.0+

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
redisconnectuserdisabledusernamepasswordwrongpassinvalidwhenpair

Problem

I am tried to connect redis 6.0+, this is the Python celery redis broker url I am config now:

broker_url = redis://:default:123456@cruise-redis-headless.reddwarf-cache.svc.cluster.local:6379/5
celery_result_backend = redis://:default:123456@cruise-redis-headless.reddwarf-cache.svc.cluster.local:6379/5


but when I start the celery using this command:

```
root@pydolphin-service-6fc4b98f54-msfql:~/pydolphin# celery -A dolphin.tasks.tasks worker --loglevel=INFO -n worker2 -Q non_editor_pick_and_diff_pull --concurrency 2
/usr/local/lib/python3.9/site-packages/celery/platforms.py:834: SecurityWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!

Please specify a different user using the --uid option.

User information: uid=0 euid=0 gid=0 egid=0

warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(

-------------- celery@worker2 v5.1.2 (sun-harmonics)
--- * -----
-- *** ---- Linux-3.10.0-1160.31.1.el7.x86_64-x86_64-with-glibc2.28 2021-08-08 20:45:35
  • *** --- * ---
  • ** ---------- [config]
  • ** ---------- .> app: tasks:0x7fb4f6c2dd90
  • ---------- .> transport: redis://:@cruise-redis-headless.reddwarf-cache.svc.cluster.local:6379/5
  • ---------- .> results: redis://:@cruise-redis-headless.reddwarf-cache.svc.cluster.local:6379/5
  • *** --- * --- .> concurrency: 2 (prefork)


-- *** ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- * -----
-------------- [queues]
.> non_editor_pick_and_diff_pull exchange=non_editor_pick_and_diff_pull(direct) key=non_editor_pick_and_diff_pull


[tasks]
. pydolphin.dolphin.tasks.cert-tasks
. pydolphin.dolphin.tasks.tasks

[2021-08-08 20:45:35,540: ERROR/MainProcess] consumer: Cannot connect to redis://:**@cruise-redis-headless.reddwarf-cache.svc.cluster.local:6379/5: WRONGPASS invalid username-password pair or user is disabled..
Trying again in 2.00 seconds... (1/100)

[2021-08-08 20:45:

Solution

It was probably the ":" before the username in the URL. Should have been
redis://default:123456@cruise-redis...


The case when you might use a leading colon in the URL is when connecting with a password but no username. Then it would look like this:
redis://:somepass@host...

Context

StackExchange Database Administrators Q#297751, answer score: 8

Revisions (0)

No revisions yet.