Auto_Bangumi
Auto_Bangumi copied to clipboard
[Feature Request]希望增加延时连接下载器或连接失败自动重试功能
功能改进
最近遇到几次开机后不更新RSS,需要在网页上手动点击启动的情况,看了一下Log应该是autobangumi比qbittorrent早几秒启动,导致连接不到下载器,启动失败
能否增加一个小功能,系统启动后延时几秒再连接qbittorrent,或者qbittorrent连接失败后自动重试几次,感谢
LOG如下
[2023-10-25 12:43:53] INFO: Started server process [7]
[2023-10-25 12:43:53] INFO: Waiting for application startup.
[2023-10-25 12:43:53] INFO:
[2023-10-25 12:43:53] INFO: _ ____ _
[2023-10-25 12:43:53] INFO: /\ | | | _ \ (_)
[2023-10-25 12:43:53] INFO: / \ _ _| |_ ___ | |_) | __ _ _ __ __ _ _ _ _ __ ___ _
[2023-10-25 12:43:53] INFO: / /\ \| | | | __/ _ \| _ < / _` | '_ \ / _` | | | | '_ ` _ \| |
[2023-10-25 12:43:53] INFO: / ____ \ |_| | || (_) | |_) | (_| | | | | (_| | |_| | | | | | | |
[2023-10-25 12:43:53] INFO: /_/ \_\__,_|\__\___/|____/ \__,_|_| |_|\__, |\__,_|_| |_| |_|_|
[2023-10-25 12:43:53] INFO: __/ |
[2023-10-25 12:43:53] INFO: |___/
[2023-10-25 12:43:53] INFO: Version 3.1.10 Author: EstrellaXD Twitter: https://twitter.com/Estrella_Pan
[2023-10-25 12:43:53] INFO: GitHub: https://github.com/EstrellaXD/Auto_Bangumi/
[2023-10-25 12:43:53] INFO: Starting AutoBangumi...
[2023-10-25 12:43:53] INFO: Config loaded
[2023-10-25 12:43:53] DEBUG: Starting new HTTP connection (1): 172.17.0.1:8989
[2023-10-25 12:43:53] ERROR [Checker] Downloader connect failed.
[2023-10-25 12:43:53] WARNING: Program failed to start.
[2023-10-25 12:43:53] INFO: Application startup complete.
[2023-10-25 12:43:53] INFO: Uvicorn running on http://0.0.0.0:7892 (Press CTRL+C to quit)
2023-10-25T04:43:51.488863771Z s6-rc: info: service s6rc-oneshot-runner successfully started
2023-10-25T04:43:51.491626146Z s6-rc: info: service fix-attrs: starting
2023-10-25T04:43:51.516898190Z s6-rc: info: service fix-attrs successfully started
2023-10-25T04:43:51.517461107Z s6-rc: info: service legacy-cont-init: starting
2023-10-25T04:43:51.526718483Z cont-init: info: running /etc/cont-init.d/qBittorrent.sh
2023-10-25T04:43:51.579429197Z trackers更新任务已存在。
2023-10-25T04:43:56.681229459Z 更新文件未正确下载,更新未成功,请检查网络。
2023-10-25T04:43:56.721251797Z usermod: no changes
2023-10-25T04:43:56.776855635Z cont-init: info: /etc/cont-init.d/qBittorrent.sh exited 0
2023-10-25T04:43:56.777618927Z s6-rc: info: service legacy-cont-init successfully started
2023-10-25T04:43:56.777977677Z s6-rc: info: service legacy-services: starting
2023-10-25T04:43:56.788450178Z services-up: info: copying legacy longrun cron (no readiness notification)
2023-10-25T04:43:56.792439595Z services-up: info: copying legacy longrun qBittorrent (no readiness notification)
2023-10-25T04:43:56.803736721Z s6-rc: info: service legacy-services successfully started
2023-10-25T04:43:56.948142028Z WebUI 界面将在内部准备不久后启动。请稍等…
印象里之前有类似的issues,似乎之前解决过,不过我偶尔重启nas时也会碰到这个问题,我都是重启后进webui设置应用一下。
印象里之前有类似的issues,似乎之前解决过,不过我偶尔重启nas时也会碰到这个问题,我都是重启后进webui设置应用一下。
我这宿舍每次出门都要断电,每天点一遍确实麻烦了点
#429 当时看的是这个,但现在好像没效果。。
version: "3.4"
services:
qbittorrent:
container_name: qbittorrent
image: linuxserver/qbittorrent
hostname: qbittorrent
environment:
- PGID=$(id -g)
- PUID=$(id -u)
- TZ=Asia/Shanghai
volumes:
- ./qb_config:/config
- <your_anime_path>:/downloads # 注意 修改此处为自己存放动漫的目录,ab 内下载路径填写downloads
network_mode: bridge
restart: unless-stopped
healthcheck: # HEALTH CHECK
test: ["CMD", "wget", "--spider", "http://qbittorrent:8080"]
interval: 30s
timeout: 10s
retries: 3
AutoBangumi:
image: "ghcr.io/estrellaxd/auto_bangumi:latest"
container_name: AutoBangumi
depends_on: # DEPEND ON
qbittorrent:
condition: service_healthy
volumes:
- ./config:/app/config
- ./data:/app/data
network_mode: bridge
dns:
- 223.5.5.5
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- PGID=$(id -g)
- PUID=$(id -u)
- UMASK=022
可以考虑添加health check 来解决问题 #429
@EstrellaXD 是否有必要加入到docs中
version: "3.4" services: qbittorrent: container_name: qbittorrent image: linuxserver/qbittorrent hostname: qbittorrent environment: - PGID=$(id -g) - PUID=$(id -u) - TZ=Asia/Shanghai volumes: - ./qb_config:/config - <your_anime_path>:/downloads # 注意 修改此处为自己存放动漫的目录,ab 内下载路径填写downloads network_mode: bridge restart: unless-stopped healthcheck: # HEALTH CHECK test: ["CMD", "wget", "--spider", "http://qbittorrent:8080"] interval: 30s timeout: 10s retries: 3 AutoBangumi: image: "ghcr.io/estrellaxd/auto_bangumi:latest" container_name: AutoBangumi depends_on: # DEPEND ON qbittorrent: condition: service_healthy volumes: - ./config:/app/config - ./data:/app/data network_mode: bridge dns: - 223.5.5.5 restart: unless-stopped environment: - TZ=Asia/Shanghai - PGID=$(id -g) - PUID=$(id -u) - UMASK=022
可以考虑添加health check 来解决问题 #429
@EstrellaXD 是否有必要加入到docs中
按这个设置了,修改docker-compose.yml后首次重建容器是正常的,但是重启机器或者docker服务重启后就出问题了,depends_on貌似失效了一样,还是需要手动去重启应用。
version: "3.4" services: qbittorrent: container_name: qbittorrent image: linuxserver/qbittorrent hostname: qbittorrent environment: - PGID=$(id -g) - PUID=$(id -u) - TZ=Asia/Shanghai volumes: - ./qb_config:/config - <your_anime_path>:/downloads # 注意 修改此处为自己存放动漫的目录,ab 内下载路径填写downloads network_mode: bridge restart: unless-stopped healthcheck: # HEALTH CHECK test: ["CMD", "wget", "--spider", "http://qbittorrent:8080"] interval: 30s timeout: 10s retries: 3 AutoBangumi: image: "ghcr.io/estrellaxd/auto_bangumi:latest" container_name: AutoBangumi depends_on: # DEPEND ON qbittorrent: condition: service_healthy volumes: - ./config:/app/config - ./data:/app/data network_mode: bridge dns: - 223.5.5.5 restart: unless-stopped environment: - TZ=Asia/Shanghai - PGID=$(id -g) - PUID=$(id -u) - UMASK=022
可以考虑添加health check 来解决问题 #429 @EstrellaXD 是否有必要加入到docs中
按这个设置了,修改docker-compose.yml后首次重建容器是正常的,但是重启机器或者docker服务重启后就出问题了,depends_on貌似失效了一样,还是需要手动去重启应用。
我使用的是 qbit enhanced 容器,也发现了这个问题。第一次发现问题时,在 compose 中添加了 healthcheck,逻辑和模板类似。我的 linux 主机是每天重启的,今天又发现了这个问题,需要手动重启 ab 容器。
是否可能给 ab 加一个 healthcheck endpoint?这样可以查看 ab 容器是否为健康状态。
@el-nino2020 大版本更新可能解决
我也碰到这个问题,很无语autobangumi,失败也要定时尝试重连qbittorrent直到成功才对,但就卡在那了,因为我的docker是部署在pve的lxc-debian容器里的,我的解决方案是写了个sh脚本,在系统reboot过后10分钟会自动运行sh脚本重启docker里的autobangumi容器,目前来说问题解决了,但还是希望作者能修修,不想搞些多余的操作。