Unable to connect to Redis with correct credentials
See original GitHub issueI’m attempting to use a newly created Redis user. However, I’m getting the following error:
error: Uncaught (in promise) Error: -WRONGPASS invalid username-password pair
throw new ErrorReplyError(line);
^
at tryParseErrorReply (https://deno.land/x/redis@v0.25.4/protocol/reply.ts:205:11)
at readReply (https://deno.land/x/redis@v0.25.4/protocol/reply.ts:55:7)
at async RedisConnection.connectThunkified (https://deno.land/x/redis@v0.25.4/connection.ts:97:11)
at async RedisConnection.connect (https://deno.land/x/redis@v0.25.4/connection.ts:126:5)
at async connect (https://deno.land/x/redis@v0.25.4/redis.ts:2287:3)
at async file://<location>
I’m essentially connecting to the following client via the following:
export const REDIS = await connect(parseURL(Deno.env.get("REDIS_URL")!));
When using my Redis default user, this code works fine. However, when using the new user, it doesn’t. I know the REDIS_URL environmental variable is correct because I’ve used it to access Redis via redis-cli -u <url>.
Please let me know if there’s any more information you need and thank you in advance.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Could not connect to Redis at 127.0.0.1:6379 - Stack Overflow
After installing redis , type from terminal : redis-server. And Redis-Server will be started.
Read more >WRONGPASS invalid username-password pair #1591 - GitHub
I have the same issue as @darklight147. Setting the username to redis://default:password@ip or empty string redis://:password@ip does not help.
Read more >Unable to connect to Redis 6 as non-default user - GitLab
Attempt to configure GitLab to connect to Redis as that user. ... pods still crash with an error indicating the credentials are incorrect....
Read more >Troubleshoot connecting to an ElastiCache for Redis cluster
If you recently created the cluster, verify that the cluster creation completed and that the cluster is ready to accept connections.
Read more >Could not connect to redis connection refused - Fix it easily
The most common reason for the connection refused error is that the Redis-Server is not started. Redis server should be started to use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@uki00a all good, I will add a couple tests for the new situations
Will let ya know when its ready to roll, I should be able to complete this tonight once other work is done (I am on GMT)
Thanks for the quick turn-around, this was a breaking issue for me so assume its same for a few others.
-Scott
suggest you update
RedisConnectionOptionsto supportusername?: stringand also updateauthenticatefunction to check forusernameand adjust redis command as needed for password/default auth"AUTH", passwordand if exists"AUTH", username, passwordnot sure if this is being progressed, if not I am more than willing push these changes as a PR let me know, as I am using a modified local repo for production currently with redis cloud.
also I am not sure where to add tests for this as there are connection tests in
/tests/commands/generaland/tests/commands/connectionpolite suggestions encouraged 😉@uki00a @keroxp I can push a PR from my local branch anytime as its done and I am using in production. (ps. never done a PR request/push to opensource before, but my local version <branched as #300> is ready to be pushed as a PR, if I am added as a contributor.)