hotio / qbittorrent

https://hotio.dev/containers/qbittorrent
GNU General Public License v3.0
116 stars 14 forks source link

Fails to start when disabling IPv6 #5

Closed JJGO closed 3 years ago

JJGO commented 3 years ago

Using the following docker-compose.yml from the docs

version: "3.7"

services:
  qbittorrent:
    container_name: qbittorrent
    image: hotio/qbittorrent
    ports:
      - "8080:8080"
      - "8118:8118"
    environment:
      - PUID=1001
      - PGID=1001
      - UMASK=002
      - TZ=Etc/UTC
      - VPN_ENABLED=true
      - VPN_LAN_NETWORK=172.18.0.0/16
      - VPN_CONF=wg0
      # - VPN_ADDITIONAL_PORTS=7878/tcp,9117/tcp
      - PRIVOXY_ENABLED=false
    volumes:
      - ./config:/config
    cap_add:
      - NET_ADMIN
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv6.conf.all.disable_ipv6=1

And I'm getting the following trace (see below). I believe the issue is related to the Error: IPv6 is disabled on nexthop device. but not sure why IPv6 is needed when I specified net.ipv6.conf.all.disable_ipv6=1 in the docker-compose.

$ docker-compose up
Recreating qbittorrent ... done
Attaching to qbittorrent
qbittorrent    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
qbittorrent    | [s6-init] ensuring user provided files have correct perms...exited 0.
qbittorrent    | [fix-attrs.d] applying ownership & permissions fixes...
qbittorrent    | [fix-attrs.d] done.
qbittorrent    | [cont-init.d] executing container initialization scripts...
qbittorrent    | [cont-init.d] 00-env-file-init: executing...
qbittorrent    | [cont-init.d] 00-env-file-init: exited 0.
qbittorrent    | [cont-init.d] 00-start-container: executing...
qbittorrent    |
qbittorrent    | ----------------------------------------------------------------------
qbittorrent    | ENVIRONMENT
qbittorrent    | ----------------------------------------------------------------------
qbittorrent    | PUID=1001
qbittorrent    | PGID=1001
qbittorrent    | UMASK=002
qbittorrent    | TZ=Etc/UTC
qbittorrent    | WEBUI_PORTS=8080/tcp,8080/udp
qbittorrent    | VPN_ENABLED=true
qbittorrent    | VPN_LAN_NETWORK=172.18.0.0/16
qbittorrent    | VPN_CONF=wg0
qbittorrent    | VPN_ADDITIONAL_PORTS=
qbittorrent    | PRIVOXY_ENABLED=false
qbittorrent    | ----------------------------------------------------------------------
qbittorrent    |
qbittorrent    | Executing usermod...
qbittorrent    | Applying permissions to /config
qbittorrent    | [cont-init.d] 00-start-container: exited 0.
qbittorrent    | [cont-init.d] 01-configure-app: executing...
qbittorrent    | Installing default "qBittorrent.conf"...
qbittorrent    | [cont-init.d] 01-configure-app: exited 0.
qbittorrent    | [cont-init.d] 02-setup-wg: executing...
qbittorrent    | [INFO] Docker network type is not set to "host".
qbittorrent    | [INFO] "sysctl net.ipv4.conf.all.src_valid_mark=1" is set.
qbittorrent    | [INFO] Configuration file "/config/wireguard/wg0.conf" was found.
qbittorrent    | [INFO] WireGuard is down. Continuing...
qbittorrent    | [INFO] Starting WireGuard...
qbittorrent    | [#] ip link add wg0 type wireguard
qbittorrent    | [#] wg setconf wg0 /dev/fd/63
qbittorrent    | [#] ip -4 address add 10.0.0.2/32 dev wg0
qbittorrent    | [#] ip link set mtu 1420 up dev wg0
qbittorrent    | [#] resolvconf -a wg0 -m 0 -x
qbittorrent    | [#] wg set wg0 fwmark 51820
qbittorrent    | [#] ip -6 route add ::/0 dev wg0 table 51820
qbittorrent    | Error: IPv6 is disabled on nexthop device.
qbittorrent    | [#] resolvconf -d wg0 -f
qbittorrent    | [#] ip link delete dev wg0
qbittorrent    | [ERROR] WireGuard failed to start.
qbittorrent    | [cont-init.d] 02-setup-wg: exited 1.
qbittorrent    | [cont-finish.d] executing container finish scripts...
qbittorrent    | [cont-finish.d] 01-kill-wg: executing...
qbittorrent    | [cont-finish.d] 01-kill-wg: exited 0.
qbittorrent    | [cont-finish.d] done.
qbittorrent    | [s6-finish] waiting for services.
qbittorrent    | [s6-finish] sending all processes the TERM signal.
qbittorrent    | [s6-finish] sending all processes the KILL signal and exiting.
qbittorrent exited with code 1
mrhotio commented 3 years ago

Remove all ipv6 related stuff from your wg0.conf

ghost commented 11 months ago

Thanks. Removing all ipv6 related entries solved the issue. In my case it was a wireguard container trying to access the WG server running also in a container. The client configuration contained a "::a" entry. :