question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Azure Redis with SSL

See original GitHub issue

When using Azure Redis with the default set to SSL I keep getting the following error:

ioredis:redis status[beneofficeqaredis.redis.cache.windows.net:6380]: [empty] -> connecting +0ms
  ioredis:redis queue command[0] -> ping() +4ms
  ioredis:redis status[40.71.2.86:6380]: connecting -> connect +277ms
  ioredis:redis write command[0] -> auth(aCeG5Wo6BvO393T628hUx4XttcHeTG5Sr7E+9wQ6NNQ=) +7ms
  ioredis:redis write command[0] -> info() +2ms


  ioredis:connection error: Error: read ECONNRESET +10s
[ioredis] Unhandled error event: Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at TCP.onread (net.js:615:25)
  ioredis:redis status[40.71.2.86:6380]: connect -> close +1ms
  ioredis:connection reconnect in 2ms +0ms
  ioredis:redis status[40.71.2.86:6380]: close -> reconnecting +1ms
  ioredis:redis status[40.71.2.86:6380]: reconnecting -> connecting +2ms
  ioredis:redis status[40.71.2.86:6380]: connecting -> connect +3ms
  ioredis:redis write command[0] -> auth(aCeG5Wo6BvO393T628hUx4XttcHeTG5Sr7E+9wQ6NNQ=) +0ms
  ioredis:redis write command[0] -> info() +1ms

Sample code

    let redisOptions: any = {};
    if(process.env.REDIS_PASSWORD) {
        redisOptions.password = process.env.REDIS_PASSWORD;
    }

    let client = new Redis(Number.parseInt(process.env.REDIS_PORT), process.env.REDIS_ADDRESS, redisOptions);
    await client.ping();

    client.disconnect();

Now when I enable the non SSL port I do not get any of these issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

16reactions
sushchevskiycommented, Jan 30, 2018

Ok, found solution =) Just set tls = true.

{
     port: 6380,
     host: 'your_host.redis.cache.windows.net',
     password: 'your_pass',
     tls: true as any,
}
0reactions
sebastiangugcommented, Sep 27, 2019

@sushchevskiy thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect SSL certificate for redis cache with private endpoint ...
The ssl certificate used by the redis service does not include *.privatelink.redis.cache.windows.net as a subject alternative name.
Read more >
Not able to connect Azure Redis cache when SSL = "True ...
In Dot Net MVC web application, in developer code, when we set SSL = "True", Port = "6380", we are not able to...
Read more >
Azure Redis connection failure when using SSL - Stack Overflow
I am using Spring Session with Redis using Azure Redis. Things are working fine with the non-SSL port 6379. However with the SSL...
Read more >
Connection to Azure Redis is not working from some machines
Even if we can't detect the exact problem, we could perhaps just detect a general SslStream failure and add something like "blah blah...
Read more >
Secure SSL Redis connections - ServiceStack Docs
Secure SSL Redis connections to Azure Redis # ... The SSL Support in the Redis Client also enables secure access to a redis-server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found