StackExchange / StackExchange/StackExchange.Redis
Upon connection restored to server that was restarted, re-authentication is not performed
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 1.6k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
If you are connected to a Redis server that uses authentication and connection is lost due to a system reboot. When the server comes back online (with the same IP) the multiplexer automatically reconnects but fails to re-authenticate to the endpoint.
This puts the connection in a bad state.
You can attempt to catch this and resolve it using this.
_multiplexerLeader.ConnectionRestored += (s,e) =>
{
_multiplexerLeader.GetDatabase().Execute("AUTH", config.TILE38_PASSWORD);
};
But this is not the first thing executed once the connection is restored. So there are a large number of SETs (if queued up) that fail.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the multiplexer reconnection path and the ConnectionRestored event described in the issue. Reproduce the problem against an authenticated Redis server by restarting it, then verify that re-authentication occurs before queued SET operations are processed and that the connection no longer enters a bad state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100