I am trying to connect Azure Redis cache from a simple .net 4.6.1 console app and getting the below when I try do StringSet
StackExchange.Redis.RedisConnectionException: 'The message timed out in the backlog attempting to send because no connection became available (5000ms) - Last Connection Exception: It was not possible to connect to the redis server(s). ConnectTimeout, command=SET, timeout: 5000, inst: 0, qu: 1, qs: 0, aw: False, bw: SpinningDown, rs: NotStarted, ws: Initializing, in: 0, last-in: 0, cur-in: 0, sync-ops: 1, async-ops: 1, serverEndpoint: sjrediscache.redis.cache.windows.net:6380, conn-sec: n/a, aoc: 0, mc: 1/1/0, mgr: 10 of 10 available, clientName: 5CG0251G81(SE.Redis-v2.6.116.40240), IOCP: (Busy=0,Free=1000,Min=8,Max=1000), WORKER: (Busy=0,Free=2047,Min=8,Max=2047), v: 2.6.116.40240 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)'
Here is my code, any suggestions of what can be done?
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
// Connect to Azure Redis Cache
string redisConnectionString = "sjrediscache.redis.cache.windows.net:6380,password=**************=,ssl=True,abortConnect=False,sslProtocols=tls12";
redisConnection = ConnectionMultiplexer.Connect(redisConnectionString);
I then disabled SLL and tried to connect to 6379 port , but still getting the same rror
Error :
Unhandled exception. StackExchange.Redis.RedisConnectionException: The message timed out in the backlog attempting to send because no connection became available (5000ms) - Last Connection Exception: It was not possible to connect to the redis server(s). ConnectTimeout, command=SET, timeout: 5000, inst: 0, qu: 1, qs: 0, aw: False, bw: SpinningDown, rs: NotStarted, ws: Initializing, in: 0, last-in: 0, cur-in: 0, sync-ops: 1, async-ops: 1, serverEndpoint: sjrediscache.redis.cache.windows.net:6379, conn-sec: n/a, aoc: 0, mc: 1/1/0, mgr: 10 of 10 available, clientName: 5CG0251G81(SE.Redis-v2.6.122.38350), IOCP: (Busy=0,Free=1000,Min=8,Max=1000), WORKER: (Busy=0,Free=32767,Min=8,Max=32767), POOL: (Threads=12,QueuedItems=0,CompletedItems=65,Timers=4), v: 2.6.122.38350 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
---> StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s). ConnectTimeout
--- End of inner exception stack trace ---
at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T] in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2093 at StackExchange.Redis.RedisBase.ExecuteSync[T] in //src/StackExchange.Redis/RedisBase.cs:line 62
at StackExchange.Redis.RedisDatabase.StringSet(RedisKey key, RedisValue value, Nullable`1 expiry, Boolean keepTtl, When when, CommandFlags flags) in //src/StackExchange.Redis/RedisDatabase.cs:line 3164
at AzureRedis.Program.Main(String[] args) in C:\Users\Jonnasn1\source\repos\AzureRedis\AzureRedis\Program.cs:line 19