StackExchange / StackExchange/StackExchange.Redis

can not connect to new master redis when old master down

Open
#2,323 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When my master redis is down in my redis sentinel, my dotnet application will enter ConfigurationChanged event, and new master redis is work.
But my redis client in my my dotnet application still connect to old master redis in linux server instead of new master redis.

1 windows server, kill redis master, my redis client will connect to new master redis.
2 windows server, power off old master redis server, my redis client will connect to new master redis.
3 linux server, kill redis master, my redis client will connect to new master redis.
4 linux server, power off old master redis server, my redis client can not connect to new master redis(it still connect to old master redis).

enviroment:
-dotnet core 3.1, centos7.9, redis(have tried serveral version)
-SE.redis (have tried serveral version)

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 at the ConfigurationChanged event and investigate Sentinel master failover handling in the client. Reproduce the reported case on CentOS 7.9 by powering off the old Redis master, then verify that the client connects to the new master rather than continuing to use the old address.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.