当前位置: 首页>>技术问答>>正文


HTTPS问题”Failed to renew certificate with error: HTTPSConnectionPool”解决办法

问题描述:

我们使用certbot的https秘钥生成服务,创建了https网站。不过在使用”certbot renew”命令更新https秘钥时遇到如下问题,

Tue Dec 28 14:13:02 CST 2021=> certbot renew…

/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.

  from cryptography import utils, x509

Failed to renew certificate xxx.com with error: HTTPSConnectionPool(host=’acme-v02.api.letsencrypt.org’, port=443): Max retries exceeded with url: /directory (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)],)”,),))

All renewals failed. The following certificates could not be renewed:

  /etc/letsencrypt/live/xxx.com/fullchain.pem (failure)

1 renew failure(s), 0 parse failure(s)

格式有点乱,问题的截图如下:

https certbot rewnew HTTPSConnectionPool问题

这个问题不太常见,在google/baidu一顿猛搜没有找到合适的答案。

后来经过不断反复尝试,发现一个简单命令可以解决问题。

解决方案:

使用命令”yum install ca-certificates”, 安装相关的组件,然后重新执行certbot renew即可。

注意:我的服务器是centos操作系统,用yum这个安装命令。其他的系统可用”apt install ca-certificates”等。

执行”yum install ca-certificates”命令后,安装的package如下

yum install

以上。

本文由《堆栈答案》整理。文章地址: https://stackanswer.com/article/4666.html,未经允许,请勿转载。