Skip to content
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

REDIS_AUTH does not work with sentinel #184

Open
p53 opened this issue Oct 27, 2020 · 4 comments
Open

REDIS_AUTH does not work with sentinel #184

p53 opened this issue Oct 27, 2020 · 4 comments

Comments

@p53
Copy link

p53 commented Oct 27, 2020

as used right now REDIS_AUTH is not used for authentication when using sentinel type, you have to encode password in redis uri in REDIS_URL variable, this should be fixed or mentioned in documentation

@kari-awake
Copy link

Maybe

diff --git a/src/redis/driver_impl.go b/src/redis/driver_impl.go
index 18e213f..272803c 100644
--- a/src/redis/driver_impl.go
+++ b/src/redis/driver_impl.go
@@ -109,7 +109,7 @@ func NewClientImpl(scope stats.Scope, useTls bool, auth string, redisType string
 		if len(urls) < 2 {
 			panic(RedisError("Expected master name and a list of urls for the sentinels, in the format: <redis master name>,<sentinel1>,...,<sentineln>"))
 		}
-		client, err = radix.NewSentinel(urls[0], urls[1:], radix.SentinelPoolFunc(poolFunc))
+		client, err = radix.NewSentinel(urls[0], urls[1:], radix.SentinelConnFunc(df), radix.SentinelPoolFunc(poolFunc))
 	default:
 		panic(RedisError("Unrecognized redis type " + redisType))
 	}

@DanTulovsky
Copy link

What is the syntax to encode the password into the REDIS_URL variable?

@DanTulovsky
Copy link

redis://:p455w0rd@localhost:9376 apparently..

@alperdedeoglu
Copy link

alperdedeoglu commented Sep 30, 2023

Indeed, I can also confirm this issue from my side.
I also think that current documentation should mention this.

This is an open point.
Are PR's welcome in this case for fixing this issue on the radix client side @vsabella?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants