A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/StackExchange/StackExchange.Redis/issues/2591 below:

Failed to connect to Sentinel cluster using Resp3 protocol · Issue #2591 · StackExchange/StackExchange.Redis · GitHub

Hi!

StackExchange.Redis version 2.7.4
Redis server version 7.0.4

My connection string looks like the following: "redis1:26379, redis2:26379, redis3:26379, serviceName=mymaster, abortConnect=false". I connect like this: ConnectionMultiplexer.Connect(connectionString, logger).
It works like a charm. But when i'm trying to activate new Resp3 protocol adding ", protocol=resp3" to the connection string things are going wrong. I see "StackExchange.Redis.RedisCommandException: This operation has been disabled in the command-map and cannot be used: HELLO" errors in my logs along with messages like "StackExchange.Redis.RedisConnectionException: UnableToConnect on redis1:26379/Interactive, Initializing/NotStarted, last: HELLO, ...".

Having investigated source code i found a couple of interesting places:

private ConnectionMultiplexer(ConfigurationOptions configuration, ServerType? serverType = null, EndPointCollection? endpoints = null) {
...
var map = CommandMap = configuration.GetCommandMap(serverType);
...
}

internal CommandMap GetCommandMap(ServerType? serverType) => serverType switch
        {
            ServerType.Sentinel => CommandMap.Sentinel,
            _ => CommandMap,
        };

public static CommandMap Sentinel { get; } = Create(new HashSet<string> {
            "auth", "ping", "info", "role", "sentinel", "subscribe", "shutdown", "psubscribe", "unsubscribe", "punsubscribe" }, true);

Looks like when the lib detects connection type as Sentinel, it overrides CommandMap with the value, which doesn't contain HELLO command. And i didn't manage to force HELLO availability any way. However according to https://redis.io/docs/management/sentinel/#sentinel-commands Sentinel supports HELLO.

Is it a bug in StackExchange.Redis or should i add some configuration / change the way of connection?

aaulbekov, pakinvadim, Anna-Gridneva, vikuznetsov, alkimappulate and 9 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4