I am using Heroku for hosting my Express.js app. Recently I have upgrade the redis addon of my app that deployed on Heroku from 5.X to 7.0. And I have upgraded the redis module version to latest (4.6.7) in my codebase. But I am getting following error after deploying to Heroku. And it is not working on my local env as well, but can't see any redis connection error log in my local env.
Error accepting a client connection: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
I have just followed the guide from Heroku for the connection. Following code snippet is my redis config:
import * as Redis from 'redis'
import { REDIS_CONNECTION } from './../../constants';
const url = REDIS_CONNECTION;
export const createRedisClient = () => {
return Redis.createClient({
url,
socket: {
tls: true,
rejectUnauthorized: false,
},
})
};