-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AUTH issue with version 3.4.0 #1274
Comments
Can confirm. Did a Heroku deploy, which installed the latest version of redis and got the following error:
|
Your connection URL has a username specified, which prior to Redis 6 is technically incorrect. Redis pre-6.0 had no concept of usernames. redis-py prior to 3.4.0 simply ignored the username component. redis-py 3.4.0 supports ACL authentication and obviously can no longer ignore the username component of a connection URL. I've created a patch in e39ae45 that attempts to detect this condition and falls back to old-style authentication when a username is supplied but the Redis server doesn't support it. |
I've upgraded an getting the following traceback with Celery / Kombu:
Is it the same problem, or a different one? Is a new release coming? |
Looks 3.4.1 still have the issue. |
@sileht if you’re still having this issue I’ll need some more info. 3.4.1 seems to have fixed this issue for others. |
yeah, the backtrace on sentry is a lit bit different:
and it looks like it's not catched by the:
I will try to find the complete trace in the logs. |
|
I noted that the case here is not the same: https://github.com/andymccurdy/redis-py/blob/master/redis/connection.py#L139 'auth' vs 'AUTH' is that related ? |
Yes, that seems to be the problem. The 3.4.1 fallback is looking for that specific error from the server and that comparison is case sensitive. The easiest thing you could do right now is to remove the username component from your Redis connection string. Redis pre version 6 has no concept of usernames. I’m not sure why heroku is supplying one to you, but redis-py pre 3.4 would simply ignore it. I’ll consider making the error message checking case insensitive. |
@andymccurdy what do you think about trying to call |
@itamarhaber I'm hesitant to call |
@sileht I added support for both 'auth' and 'AUTH' strings in master. |
Great thx ! |
I started to see this same error after upgrading from 3.3.x to 3.4.1. However, I do NOT have a username in the connection string (I'm using redis 3.2.6). My connection string looks like this: Seems like it may be related to the fix of the bug above. |
@atleta Your connection string does have a username. A connection string that has no username but does have a password looks like: |
I was having the same issue with 3.4.1 deployed on Heroku. I'm using the RedisCloud add-on which automatically adds the REDISCLOUD_URL config variable. The connection string includes 'rediscloud' as the username. I removed the username and it started working again. Thanks for the info. |
@shawnrobb I am also using rediscloud and heroku redis addons on my servers and I have to warn you here:
I am not yet sure how this is internally done, but I can imagine they can put back credentials with username and password, as it happens the moment you provision a new addon. I did not have a chance to check this, but I guess it is worth noting here. Cheers, |
This helped us on our heroku issue today, not sure if why it all of a sudden popped up. Thanks for the info! |
Version
redis-py 3.4.0
redis_version: 5.0.4 (redis-cloud on heroku)
Platform:
python 3.8 on heroku
Description:
After upgrading from 3.3.11 to 3.4.0 the authentication won't work anymore:
Downgrading have workaround our issue.
The url passed to redis client looks like:
redis://rediscloud:<password>@redis-yyyyy.xxx.us-east-z-z.ec2.cloud.redislabs.com:12345
The text was updated successfully, but these errors were encountered: