-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
When attempting to create a new ConnectionMultiplexer instance while using a serviceName in the ConfigurationOptions (Sentinel mode) and with abortConnect=False, any failed connection returns a misleading exception that seems to imply that while a connection was established, the redis instance was detected as Standalone.
An exception of type 'StackExchange.Redis.RedisConnectionException' occurred in StackExchange.Redis.dll but was not handled in user code: 'Sentinel: The ConnectionMultiplexer is not a Sentinel connection. Detected as: Standalone'
This occurs even when the failure is the result of network issues, non-existent host, incorrect password etc
Package Version
2.8.37
Steps To Reproduce
-
Attempt to create a ConnectionMultiplexer instance using an invalid host in the ConfigurationOptions, while specifying aservicename and abortConnect=False
-
Observe exception indicates that a Standalone redis instance was detected
The same issue occurs for any type of connection failure (network issues, authentication failure).
I would expect a similar connection failure exception to be thrown as a standalone failure would (e.g. ConnectionFailureType.UnableToResolvePhysicalConnection)
The current message is misleading as no "detection" could have taken place. It implicitly suggests a connection was made, but that is not the case.