ERR
redis
config_error
ai_generated
true
TLS错误:证书已于<date>过期
TLS error: certificate expired at <date>
ID: redis/tls-certificate-expired
90%修复率
90%置信度
1证据数
2024-01-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 6.0.0 | active | — | — | — |
| 7.0.0 | active | — | — | — |
| 7.2.0 | active | — | — | — |
根因分析
Redis使用的TLS证书(服务器或客户端)已过期,导致TLS握手失败并拒绝连接。
English
The TLS certificate used by Redis (either server or client) has expired, causing the TLS handshake to fail and connections to be rejected.
官方文档
https://redis.io/docs/management/security/encryption/解决方案
-
生成新的自签名证书:`openssl req -x509 -newkey rsa:4096 -keyout /etc/redis/redis.key -out /etc/redis/redis.crt -days 365 -nodes`,更新redis.conf中的路径,然后重启Redis。
-
如果使用CA签名证书,通过CA续期证书并替换证书文件。使用 `redis-cli --tls --cert /path/to/new/cert.pem --key /path/to/new/key.pem` 在重启服务器前测试新证书。
-
作为临时措施,将系统时钟设置回证书有效期内的日期(不推荐用于生产),然后重启Redis以允许连接,同时计划正式续期。
无效尝试
常见但无效的做法:
-
60% 失败
Disabling TLS entirely (e.g., port 6379 without tls-port) exposes data in transit and is not a real fix for environments requiring encryption.
-
80% 失败
Setting tls-auth-clients to 'no' bypasses client certificate validation but does not fix an expired server certificate; the server certificate must be renewed.