StackExchange / StackExchange/StackExchange.Redis

Connection to Azure Redis is not working from some machines

Open
#1,589 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

☁️ platform:Azure 📃 documentation
Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

We have a solution using Azure Cache for Redis. This is working fine in our Dev environment (I'm attaching logs for working connection: RedisGoodConnection.txt), but we can't make it work in our Acceptance environment (Attached "RedisBadConnection.txt).
The only difference that I can think about is firewall rules, but firewall is open. In fact in the logs I can see that the connection is done, but TLS handshake is not happening.
Some things that I've tried, with no result:

Any idea on how to troubleshoot this will be welcome 8·)

This is a code demoing the error (redis url and password are dummy values here):

          var redisConString = "oneazurerediscache.redis.cache.windows.net:6380,password=myprivatekey,ssl=True,abortConnect=False,sslprotocols=tls12,connectTimeout=30000";
           var redis = ConnectionMultiplexer.Connect(redisConString,Console.Out);

Packages used are the last version available:

 <package id="StackExchange.Redis" version="2.1.58" targetFramework="net472" />
  <package id="StackExchange.Redis.Extensions.Core" version="6.3.5" targetFramework="net472" />

RedisBadConnection.txt
RedisGoodConnection.txt

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 by comparing RedisBadConnection.txt with RedisGoodConnection.txt, then reproduce the issue with the provided ConnectionMultiplexer.Connect example using StackExchange.Redis 2.1.58 on net472. Investigate the differing Acceptance-machine TLS handshake behavior and document a verified cause or fix when the connection succeeds there.

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.