Skip to content

Sentinel connection error when using the highIntegrity = true configuration #2992

Description

@thangpv212

I am using Redis with the sentinel model.
Environment information:

Redis version: 7.0.5
StackExchange.Redis version: 2.8.58
My connection string configuration is as follows:
“10.0.0.1:26379,10.0.0.2:26379,10.0.0.3:26379,serviceName=mycluster,abortConnect=false,highIntegrity=true”

I encountered the following error:

StackExchange.Redis.RedisConnectionException: Sentinel: The ConnectionMultiplexer is not a Sentinel connection. Detected as: Standalone
   at StackExchange.Redis.ConnectionMultiplexer.GetSentinelMasterConnection(ConfigurationOptions config, TextWriter log) in /_/src/StackExchange.Redis/ConnectionMultiplexer.Sentinel.cs:line 173
   at StackExchange.Redis.ConnectionMultiplexer.SentinelPrimaryConnectAsync(ConfigurationOptions configuration, TextWriter writer) in /_/src/StackExchange.Redis/ConnectionMultiplexer.Sentinel.cs:line 157
   at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.ConnectSlowAsync(CancellationToken token)
   at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAndRefreshAsync(String key, Boolean getData, CancellationToken token)
   at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.GetAsync(String key, CancellationToken token)
   at Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.GetStringAsync(IDistributedCache cache, String key, CancellationToken token)

Before setting highIntegrity=true, I did not encounter this error.

Please help me find the root cause of the error.
Thank you!

Activity

  1. changed the title [-]Lỗi kết nối Sentinel nếu sử dụng cấu hình highIntegrity = true[/-] [+]Sentinel connection error when using the highIntegrity = true configuration[/+] on Jan 12, 2026
  2. mgravell commented on Jan 13, 2026

    @mgravell
    Collaborator

    I think this is most-likely the same thing as #2980, with different causality; looking

  3. thangpv212 commented on Jan 13, 2026

    @thangpv212
    Author

    I think this is most-likely the same thing as #2980, with different causality; looking

    Hi @mgravell
    I have debugged and identified 2 issues here:

    1. When configuring highIntegrity=true, messages are validated using HighIntegrity, including messages with command=SENTINEL. These command=SENTINEL messages always fail at this validation step.
      I tried an alternative connection method so that command=SENTINEL messages would not be validated, and the result was successful.
    //...
    opts.HighIntegrity = false;
    var sentinelConnection = await ConnectionMultiplexer.SentinelConnectAsync(opts, logWriter);
    opts.HighIntegrity = true;
    var multiplexer = sentinelConnection.GetSentinelMasterConnection(opts, logWriter);
    

    instead of

    //...
    opts.HighIntegrity = true;
    var multiplexer = await ConnectionMultiplexer.ConnectAsync(opts, logWriter);
    

    I really want to use highIntegrity=true in combination with a Sentinel-type connection. However, I believe this is not a standard connection approach, so I am not applying it to my project.

    1. Regarding the error message:
      StackExchange.Redis.RedisConnectionException: Sentinel: The ConnectionMultiplexer is not a Sentinel connection. Detected as: Standalone
      I think this error message is not very helpful. It should provide a more accurate description of the actual error.

    I hope this information will be useful. Thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions