Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Misleading RedisConnectionException when attempting to connect in Sentinel mode with abortConnect=False

オープン
#2,893 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp, redis
領域
databases

調査の方向性

まず、無効な host、serviceName、abortConnect=False で問題を再現し、RedisConnectionException を生成する Sentinel 接続失敗の処理を追跡します。この経路を、ネットワーク障害や認証障害を含むスタンドアロン接続の失敗と比較します。失敗した Sentinel 接続が、スタンドアロンの Redis インスタンスが検出されたことを示唆せず、実際の失敗を報告すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

When attempting to create a new ConnectionMultiplexer instance while using a serviceName in the ConfigurationOptions (Sentinel mode) and with abortConnect=False, any failed connection returns a misleading exception that seems to imply that while a connection was established, the redis instance was detected as Standalone.

An exception of type 'StackExchange.Redis.RedisConnectionException' occurred in StackExchange.Redis.dll but was not handled in user code: 'Sentinel: The ConnectionMultiplexer is not a Sentinel connection. Detected as: Standalone'

This occurs even when the failure is the result of network issues, non-existent host, incorrect password etc

Package Version
2.8.37

Steps To Reproduce

  1. Attempt to create a ConnectionMultiplexer instance using an invalid host in the ConfigurationOptions, while specifying aservicename and abortConnect=False
    Image
    Image

  2. Observe exception indicates that a Standalone redis instance was detected
    Image

The same issue occurs for any type of connection failure (network issues, authentication failure).

I would expect a similar connection failure exception to be thrown as a standalone failure would (e.g. ConnectionFailureType.UnableToResolvePhysicalConnection)

The current message is misleading as no "detection" could have taken place. It implicitly suggests a connection was made, but that is not the case.

主要言語
C#
スター
6.2k
フォーク
1.6k
平均マージ
1日 23時間
マージ済み PR(30日)
31

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

StackExchange/StackExchange.Redis のほかの issue

StackExchange/StackExchange.Redis の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。