-
Notifications
You must be signed in to change notification settings - Fork 1.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
No logging or rethrowing on GetReplicasForService in ConnectionMultiplexer #1512
Comments
"intentional" is complex, but I'm going to assume "probably not", but since the code here is parallel, logging becomes... trickier; what is the scenario that caused this to fail in this way, out of curiosity? |
So the exception that i got was: Some background: I was using the bitnami redis/sentinel setup in my docker tests. I had only one redis master (first naive try). After i added a real redis slave this issue was gone. |
Hello, I am getting same error, I have only one remote sentinel master in my test environment. So is the issue resolved by adding a sentinel slave? Please confirm? |
I got it to work with one Sentinel, one Redis Master and one Redis Slave. |
Thanks for the additional info! The root of the problem here is in StackExchange.Redis/src/StackExchange.Redis/ResultProcessor.cs Lines 2069 to 2075 in f52cba7
The result processor treats "no endpoints" as an invalid state, e.g. in this case where there simply are no replicas. I pushed up a PR for this in #1527. |
Fixed via #1527 |
Hi!
I was trying out the new Sentinel support and had some issues.
Exception thrown: 'System.NullReferenceException' in StackExchange.Redis.dll: 'Object reference not set to an instance of an object.' Stack trace: at StackExchange.Redis.ConnectionMultiplexer.GetSentinelMasterConnection(ConfigurationOptions config, TextWriter log) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2401
I started to dig and found out that i had no chance to get to the real issues due to missing logging or rethrowing.
StackExchange.Redis/src/StackExchange.Redis/ConnectionMultiplexer.cs
Line 2530 in f52cba7
Is this intentional? After a tedious debug session i got at least my exception that i was looking for...
The text was updated successfully, but these errors were encountered: