t-anc / GSP-Qbittorent-Gluetun-sync-port-mod

Docker mod for Linuxserver's Qbittorrent image to sync gluetun's forwarded port.
GNU General Public License v3.0
50 stars 4 forks source link

[mod-init] (ERROR) t-anc/gsp-qbittorent-gluetun-sync-port-mod:main digest could not be fetched from ghcr.io #2

Closed Framdark closed 1 month ago

Framdark commented 1 month ago

Every so often when I restart container I get this... Thanks!

Framdark commented 1 month ago

Just adding it seems to only happen when I restart qbittorrent together with gluetun. Thanks for the help

t-anc commented 1 month ago

Hi, could you share your docker-compose file please ?

Framdark commented 1 month ago

Yes sorry for the delay and thanks for help.

Docker compose file (Just including gluetun and qbittorrent)

  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    # line above must be uncommented to allow external containers to connect.
    # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 6881:6881
      - 6881:6881/udp
      - 8085:8085 # qbittorrent
      - 9117:9117 # Jackett
      - 8989:8989 # Sonarr
      - 7878:7878 # radarr
      - 4000:8080 # sabnzbd
      - 8787:8787 # readarr
      - 8000:8000/tcp
    volumes:
      - ./gluetun:/gluetun
    environment:
      # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=openvpn
      # OpenVPN:
      - OPENVPN_USER=REDACTED
      - OPENVPN_PASSWORD=REDACTED
      - VPN_PORT_FORWARDING=on
      # Wireguard:
      - SERVER_HOSTNAMES=node-us-1xx.protonvpn.net,node-us-1xx.protonvpn.net,node-us-1xx.protonvpn.net,node-us-xxx.protonvpn.net,node-us-xxx.protonvpn.net
      # Timezone for accurate log times
      - TZ=America/Chicago
      # Server list updater
      # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
      - UPDATER_PERIOD=24h

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    network_mode: "service:gluetun"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
      - WEBUI_PORT=8085
      - UMASK_SET=022
      - DOCKER_MODS=ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
      - GSP_QBT_USERNAME=admin
      - GSP_QBT_PASSWORD=REDACTED
      - GSP_MINIMAL_LOGS=false
    volumes:
      - ./qbittorrent:/config
      - ../media/qbittorrent:/downloads
      - ../media:/media
    depends_on:
      - gluetun
    restart: always

Edit: It is the backwards quotation things not these '''

t-anc commented 1 month ago

Try with this (added "condition: service_healthy") :

gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    # line above must be uncommented to allow external containers to connect.
    # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 6881:6881
      - 6881:6881/udp
      - 8085:8085 # qbittorrent
      - 9117:9117 # Jackett
      - 8989:8989 # Sonarr
      - 7878:7878 # radarr
      - 4000:8080 # sabnzbd
      - 8787:8787 # readarr
      - 8000:8000/tcp
    volumes:
      - ./gluetun:/gluetun
    environment:
      # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=openvpn
      # OpenVPN:
      - OPENVPN_USER=REDACTED
      - OPENVPN_PASSWORD=REDACTED
      - VPN_PORT_FORWARDING=on
      # Wireguard:
      - SERVER_HOSTNAMES=node-us-1xx.protonvpn.net,node-us-1xx.protonvpn.net,node-us-1xx.protonvpn.net,node-us-xxx.protonvpn.net,node-us-xxx.protonvpn.net
      # Timezone for accurate log times
      - TZ=America/Chicago
      # Server list updater
      # See https://github.com/qdm12/gluetun-wiki/blob/main/setup/servers.md#update-the-vpn-servers-list
      - UPDATER_PERIOD=24h

  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent
    container_name: qbittorrent
    network_mode: "service:gluetun"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
      - WEBUI_PORT=8085
      - UMASK_SET=022
      - DOCKER_MODS=ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
      - GSP_QBT_USERNAME=admin
      - GSP_QBT_PASSWORD=REDACTED
      - GSP_MINIMAL_LOGS=false
    volumes:
      - ./qbittorrent:/config
      - ../media/qbittorrent:/downloads
      - ../media:/media
    depends_on:
       gluetun:
          condition: service_healthy
    restart: always

In order to download the mod, qbittorrent needs an internet connexion. At the start of gluetun, no connexion is available and so qbittorrent can't download the mod (or check for an update). With this condition, docker will delay the start of qbittorrent until gluetun's connexion is set up (=status healthy). This is just a theory but it should work.

Framdark commented 1 month ago

That seemed to fix it! Thank you