我使用的是Heroku的Redis插件。我昨天升级到了一个更高的层,现在当我向我的服务器发送请求时,我得到了这个。对这个错误日志的含义有什么建议吗?
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)我是这样连接到Redis的:
import Redis from "ioredis";
import { Job, Queue, Worker } from "bullmq";
const client = new Redis(process.env.REDIS_URL, {
connectTimeout: 30000,
tls: {
rejectUnauthorized: false,
},
});
...发布于 2021-04-07 19:34:44
Heroku发布了与Redis相关的新更新,请参见他们的changelog:https://devcenter.heroku.com/changelog-items/1952。
没有指定版本的新Redis插件现在将默认为6.0版本,因为它是由自签名证书保护的,因为它的生产计划内置了TLS。您需要添加ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }来处理自签名证书。有关更多详细信息,请参阅此处:https://devcenter.heroku.com/articles/securing-heroku-redis
你也可以通过降级到Redis 5版本来解决这个问题。您可以通过运行(使用--版本标志):heroku addons:create heroku-redis:premium-2 --version 5 -a <app-name>来完成此操作。更多细节在这里:https://devcenter.heroku.com/articles/heroku-redis#version-support-and-legacy-infrastructure。
https://stackoverflow.com/questions/66932042
复制相似问题