FG
🗄️ Databases

Connecting to an Azure Redis Cluster with TLS not working

Freshover 5 years ago
Mar 14, 20260 views
Confidence Score75%
75%

Problem

I've been trying to connect to a Redis three node cluster in Azure using ioredis When I connect using the Redis.Cluster constructor: [code block] The error I get is: [code block] When I connect using a non-cluster Redis connection: [code block] The error I get is: [code block] As you can see it is using TLS on port 6380. Azure provides me with one host+port combination and two different access-keys (primary/seconday) - which I find weird, which access-key should I use? Also I'm not sure if I should be connecting in Cluster mode, but I'd prefer to to gain the benefits of clustering. When I do it appears it tries to find the slots at `127.0.0.1:6380` which is probably not correct. In Azure's quickstart they connect using node_redis with: [code block] I was hoping someone here would have come across the same issue and solved it. Thanks! [1]: https://github.com/luin/ioredis

Error Output

error: Error: connect ECONNREFUSED 127.0.0.1:6380

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate3 verificationsLast verified Mar 14, 2026

Solution: Connecting to an Azure Redis Cluster with TLS not working

Low Risk

I ran into a similar issue, that it is telling me there are too many redirect. It happening to me when i try to connect to an ElastiCache instance. Finally this config look stable enough [code block] hope this help

74

Trust Score

3 verifications

100% success
  1. 1

    I ran into a similar issue, that it is telling me there are too many redirect. I

    I ran into a similar issue, that it is telling me there are too many redirect. It happening to me when i try to connect to an ElastiCache instance. Finally this config look stable enough

Validation

Resolved in redis/ioredis GitHub issue #1149. Community reactions: 3 upvotes.

Verification Summary

Worked: 3
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

redisiorediscache