StackExchange / StackExchange/StackExchange.Redis

Unable to connect to redis sentinel through kubernetes

Open
#2,025 35 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

⚙️ area:sentinel
Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

I've updated to the latest stackExchange Redis, this configuration used to work but now I've received this error.

I've removed commandMap as suggested in another issue. I've made sure all the ports are open.

Not sure what I'm doing wrong here... This is running in k8s

I've tried stepping through and debugging, however it looks like the Standalone type is just defaulted then I can't spot where it would be properly swapped to sentinel... If you could explain how this works to me then I might be able to debug this. Although If I've just made a numpty configuration mistake, let me know.

{"Defaults":{"AbortOnConnectFail":true,"AllowAdmin":false,"BacklogPolicy":{"QueueWhileDisconnected":true,"AbortPendingOnConnectionFailure":false},"CheckCertificateRevocation":true,"ConnectRetry":3,"ConnectTimeout":null,"CommandMap":null,"ConfigurationChannel":"__Booksleeve_MasterChanged","DefaultVersion":"3.0.0","KeepAliveInterval":"00:01:00","Proxy":0,"ReconnectRetryPolicy":null,"ResolveDns":false,"SyncTimeout":"00:00:05","TieBreaker":"__Booksleeve_TieBreak","ConfigCheckInterval":"00:01:00","ClientName":"mqube-auth-service-mqube-auth-service-56fcbb588c-b2nsh(SE.Redis-v2.5.43.42402)"},"AbortOnConnectFail":false,"AllowAdmin":false,"AsyncTimeout":10000,"UseSsl":false,"ChannelPrefix":{"IsNullOrEmpty":true},"CheckCertificateRevocation":true,"ClientName":null,"ConnectRetry":5,"CommandMap":{},"ConfigurationChannel":"__Booksleeve_MasterChanged","ConnectTimeout":10000,"DefaultDatabase":null,"DefaultVersion":"3.0.0","EndPoints":[{"Host":"redis-ha-announce-0","AddressFamily":0,"Port":26379},{"Host":"redis-ha-announce-1","AddressFamily":0,"Port":26379},{"Host":"redis-ha-announce-2","AddressFamily":0,"Port":26379}],"HighPrioritySocketThreads":true,"KeepAlive":60,"User":null,"Password":null,"PreserveAsyncOrder":false,"Proxy":0,"ReconnectRetryPolicy":{},"BacklogPolicy":{"QueueWhileDisconnected":true,"AbortPendingOnConnectionFailure":false},"ResolveDns":false,"ResponseTimeout":0,"ServiceName":"mymaster","SocketManager":null,"Ssl":false,"SslHost":null,"SslProtocols":null,"SyncTimeout":10000,"TieBreaker":"","WriteBuffer":0,"ConfigCheckSeconds":60}
Unhandled exception. StackExchange.Redis.RedisConnectionException: Sentinel: The ConnectionMultiplexer is not a Sentinel connection. Detected as: Standalone

We're using the https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha helm chart to deploy this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied EndPoints, ServiceName, and the Redis HA Helm chart configuration, then trace how StackExchange.Redis classifies the connection as Standalone rather than Sentinel. No source file or test is named in the issue. Done means identifying whether the Kubernetes endpoints or Sentinel configuration causes the mismatch and documenting a reproducible correction or clear next diagnostic step.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, kubernetes, redis
Domain
databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.