Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl证书验证问题 #106

Open
meatballgithub opened this issue Apr 27, 2021 · 2 comments
Open

ssl证书验证问题 #106

meatballgithub opened this issue Apr 27, 2021 · 2 comments

Comments

@meatballgithub
Copy link

运行报错如下(host是qb):
autoremovetorrents.main ERROR: requests.exceptions.SSLError: HTTPSConnectionPool(host='XXXX', port=XXX): Max retries exceeded with url: /api/v2/app/webapiVersion (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))
应该是验证ssl证书出错了(可能因为时自建证书的原因),在使用flexget时也遇到过同样的错误,不过flexget可以添加一句“verify_cert: False”取消证书验证。不知道autoremove-torrents如何实现

@meatballgithub
Copy link
Author

meatballgithub commented Apr 28, 2021

自己试了一下,在qbittorrent.py文件里,把self._session.get函数里都加上 verify=False就可以避免这个错误。
但是又遇到一个新问题:调用程序的时候如果host是域名,就经常会报错
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='域名', port=XXX): Max retries exceeded with url: /api/v2/app/webapiVersion (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc9539f0090>: Failed to establish a new connection: [Errno 110] Connection timed out'))
如果config文件里直接设置qb的host是ip,就不会出现这个错误。不知道是不是和ssl有关系

@jerrymakesjelly
Copy link
Owner

目前还没有处理自建证书的问题,需要在后续版本添加。

调用程序的时候如果host是域名,就经常会报错

小细节:使用 IP 连接走的是 HTTP,而设置域名走的是 HTTPS。建议优先检查目标主机的 HTTPS 服务的稳定性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants