I am using Heroku's Redis add-on. I upgraded yesterday to a higher tier and now I'm getting this when I send requests to my server. Any suggestions on what this error log means?
Apr 03 07:00:24 myapp app/redis-flexible-99415 Error accepting a client connection: error:1408F10B:SSL routines:ssl3_get_record:wrong version number (conn: fd=12)
I am connecting to Redis as so:
import Redis from "ioredis";
import { Job, Queue, Worker } from "bullmq";
const client = new Redis(process.env.REDIS_URL, {
connectTimeout: 30000,
tls: {
rejectUnauthorized: false,
},
});
...
Heroku shipped new updates related to Redis as outlined in their changelog here: https://devcenter.heroku.com/changelog-items/1952.
The New Redis addons without a version specified will now default to 6.0 version, as it is secured with the self-signed certificate because of its built-in TLS for production plans. You'll need to add ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }
to handle the self-signed certificate. Please refer here for additional details: https://devcenter.heroku.com/articles/securing-heroku-redis
You may also work around this behavior by downgrading to Redis 5 version. You can do it by running(using --version flag): heroku addons:create heroku-redis:premium-2 --version 5 -a <app-name>
. More details here: https://devcenter.heroku.com/articles/heroku-redis#version-support-and-legacy-infrastructure.