Auto_Bangumi icon indicating copy to clipboard operation
Auto_Bangumi copied to clipboard

[错误报告]无法使用Downloader,https错误

Open kexue-z opened this issue 1 year ago • 12 comments

确认

  • [X] 我的版本是最新版本,我的版本号与 version 相同。
  • [X] 我已经查阅了排错流程,确保提出的问题不在其中。
  • [X] 我已经查阅了已知问题,并确认我的问题不在其中。
  • [X] 我已经 issue 中搜索过,确认我的问题没有被提出过。
  • [X] 我已经修改标题,将标题中的 描述 替换为我遇到的问题。

当前程序版本

3.0.11

问题类型

WebUI

问题描述

不知道是不是设置问题,我搞不懂了

qb使用:superng6/qbittorrentee,启用https 端口 6880,可公网访问,API正常

image

AB 设置如下:

{
    "program": {
        "rss_time": 7200,
        "rename_time": 60,
        "webui_port": 7892
    },
    "downloader": {
        "type": "qbittorrent",
        "host": "https://website.cn:6880",
        "username": "admin",
        "password": "password",
        "path": "/downloads/Bangumi",
        "ssl": true
    },
    "rss_parser": {
        "enable": true,
        "type": "mikan",
        "token": "token",
        "custom_url": "mikanani.me",
        "parser_type": "parser",
        "filter": [
            "720",
            "\\d+-\\d"
        ],
        "language": "zh"
    },
    "bangumi_manage": {
        "enable": true,
        "eps_complete": false,
        "rename_method": "pn",
        "group_tag": false,
        "remove_bad_torrent": false
    },
    "log": {
        "debug_enable": false
    },
    "proxy": {
        "enable": true,
        "type": "http",
        "host": "192.168.0.35",
        "port": 7890,
        "username": "",
        "password": ""
    },
    "notification": {
        "enable": false,
        "type": "telegram",
        "token": "",
        "chat_id": ""
    }
}

发生问题时系统日志

[2023-07-30 14:55:23] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3bfa8d6c90>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 14:55:23] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3bfa8b7a90>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 14:55:24] WARNING:  Using 'http' instead of requested 'https' to communicate with qBittorrent
[2023-07-30 14:55:25] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3bfaa4ec50>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
[2023-07-30 14:55:25] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3bfa8bdb50>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 14:55:27] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3bfaa4fb50>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 14:55:30] WARNING:  Using 'http' instead of requested 'https' to communicate with qBittorrent
[2023-07-30 14:55:32] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3bfa8c7b10>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
[2023-07-30 14:55:32] ERROR     Cannot connect to qBittorrent Server
[2023-07-30 14:55:32] INFO:     Please check the IP and port in WebUI settings

kexue-z avatar Jul 30 '23 06:07 kexue-z

有证书的情况下ssl改成false

EstrellaXD avatar Jul 30 '23 07:07 EstrellaXD

"downloader": {
        "type": "qbittorrent",
        "host": "https://website.cn:6880",
        "username": "admin",
        "password": "password",
        "path": "/downloads/Bangumi",
        "ssl": false
    }

改成了,下面是LOG

[2023-07-30 15:13:46] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9f1c28e850>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 15:13:46] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9f1ce25090>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 15:13:46] WARNING:  Using 'http' instead of requested 'https' to communicate with qBittorrent
[2023-07-30 15:13:46] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9f1c27ed10>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
[2023-07-30 15:13:53] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9f1c25f150>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 15:13:53] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9f1c266390>: Failed to establish a new connection: [Errno 111] Connection refused')': /
[2023-07-30 15:13:53] WARNING:  Using 'http' instead of requested 'https' to communicate with qBittorrent
[2023-07-30 15:13:53] WARNING:  Retrying (Retry(total=0, connect=0, read=1, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9f1c28ec50>: Failed to establish a new connection: [Errno 111] Connection refused')': /api/v2/auth/login
[2023-07-30 15:13:53] ERROR     Cannot connect to qBittorrent Server
[2023-07-30 15:13:53] INFO:     Please check the IP and port in WebUI settings

kexue-z avatar Jul 30 '23 07:07 kexue-z

附带qb的设置 image

kexue-z avatar Jul 30 '23 07:07 kexue-z

请检查一下最新版本是否还有错误

EstrellaXD avatar Sep 24 '23 09:09 EstrellaXD

3.1.3使用https依旧无法连接, 关闭qbittorrent的https后可以正常连接 日志提示

[2023-10-02 08:48:08] ERROR     [Checker] Downloader connect failed.
[2023-10-02 08:48:08] WARNING:  Program failed to start.

banzhe avatar Oct 02 '23 01:10 banzhe

想问一下如何关闭qbittorrent的https呢?

FujinomiyaNeko981213 avatar Oct 31 '23 08:10 FujinomiyaNeko981213

把钩去掉

想问一下如何关闭qbittorrent的https呢?

kexue-z avatar Nov 01 '23 12:11 kexue-z

我已经放弃使用https,直接用局域网连上qbittorrent。

kexue-z avatar Nov 06 '23 04:11 kexue-z

3.1.11使用https依旧无法连接,目前临时解决办法部署了两套qb供内外网使用,ab访问的是内网qb。 [2023-12-03 22:45:29] ERROR [Checker] Downloader connect failed. [2023-12-03 22:45:29] WARNING: Program failed to start. 我的nas docker配置环境如下 ab版本:3.1.11 qb: 4.6.2 公网ipv6+域名+ssl证书 单元测试了下cheker下的staticmethod check_downloader(),应该为qb强制证书访问导致的错误Caused by SSLError。目前可解决的办法两种,一种是直接忽略另一种是传入证书路径进行访问,两种均可正常访问。 本次验证仅仅验证get访问,后续qb是否能够正常使用暂未验证。

微信图片_20231203225706 微信图片_20231203225701

EvanWuWuWuWu avatar Dec 03 '23 15:12 EvanWuWuWuWu

qb_downloader.py 里面用了 settings.downloader.ssl 来控制 是否允许不受信任的SSL证书连接 qb. 但是checker.check_downloader里没有用这个f导致requests.get强制使用受信任的SSL证书访问。导致自建证书无法正常连接 在check_downloader的request.get里添加 verify=settings.downloader.ssl 能临时解决这个问题 ....

Ren-Pen avatar Dec 24 '23 00:12 Ren-Pen

qb_downloader.py 里面用了 settings.downloader.ssl 来控制 是否允许不受信任的SSL证书连接 qb. 但是checker.check_downloader里没有用这个f导致requests.get强制使用受信任的SSL证书访问。导致自建证书无法正常连接 在check_downloader的request.get里添加 verify=settings.downloader.ssl 能临时解决这个问题 ....

是蜜柑自建了么?目前暂不考虑开放跳过证书信任,可能会有安全隐患,简易用acme.sh之类的脚本申请免费证书

EstrellaXD avatar Dec 24 '23 02:12 EstrellaXD

我的解决方法:跳过检测 修改/app/module/checker/checker.py

    except requests.exceptions.ConnectionError:
        logger.error("[Checker] Downloader connect failed, BUT True.")
        return True

eletic23 avatar Apr 19 '24 08:04 eletic23