Trigus42 / alpine-qbittorrentvpn

Multiarch docker image with the latest qBittorrent-nox client (WEB UI) and WireGuard/OpenVPN tunnel
GNU General Public License v3.0
85 stars 13 forks source link

Container seems to work and then randomly dies. #48

Closed Alfagun74 closed 10 months ago

Alfagun74 commented 11 months ago

Hi i have some trouble setting this up rn, as it seems everything is fine and it then dies:

version: "3"
services:
  qbittorrent:
    image: trigus42/qbittorrentvpn:latest
    container_name: qbittorrent
    privileged: true
    environment:
      - DEBUG=yes
      - TZ=Europe/Berlin
      - VPN_ENABLED=yes
      - VPN_TYPE=wireguard
      - SET_FWMARK=yes
    volumes:
      - ./config:/config
      - ./downloads:/downloads
    restart: unless-stopped
networks:
  default:
    external: true
    name: captain-overlay-network
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-environment.sh: executing... 
2023-12-18 22:44:46 [INFO] LAN_NETWORK not defined (via -e LAN_NETWORK)
2023-12-18 22:44:46 [DEBUG] Docker interface defined as eth0
2023-12-18 22:44:46 [DEBUG] Docker IP defined as 10.0.1.21
2023-12-18 22:44:46 [DEBUG] Docker netmask defined as 255.255.255.0
2023-12-18 22:44:46 [INFO] Docker network defined as 10.0.1.0/24
2023-12-18 22:44:46 [DEBUG] Default gateway defined as 172.18.0.1
2023-12-18 22:44:46 [INFO] PUID not defined. Defaulting to 1000
2023-12-18 22:44:46 [INFO] PGID not defined. Defaulting to 1000
2023-12-18 22:44:46 [INFO] An user with PUID 1000 does not exist, adding an user called 'qbittorrent' with PUID 1000
2023-12-18 22:44:46 [INFO] VPN_ENABLED defined as 'yes'
2023-12-18 22:44:46 [INFO] VPN_TYPE defined as 'wireguard'
2023-12-18 22:44:46 [WARNING] NAME_SERVERS not defined (via -e NAME_SERVERS), defaulting to CloudFlare and Google name servers
2023-12-18 22:44:46 [INFO] Adding 1.1.1.1 to resolv.conf
2023-12-18 22:44:46 [INFO] Adding 8.8.8.8 to resolv.conf
2023-12-18 22:44:46 [INFO] Adding 1.0.0.1 to resolv.conf
2023-12-18 22:44:46 [INFO] Adding 8.8.4.4 to resolv.conf
[cont-init.d] 01-environment.sh: exited 0.
[cont-init.d] 02-vpn.sh: executing... 
2023-12-18 22:44:46 [INFO] Choosen VPN config: 'cz-prg.conf'
2023-12-18 22:44:46 [INFO] VPN remote line defined as 'cz-prg.prod.surfshark.com:51820'
2023-12-18 22:44:46 [INFO] VPN_REMOTE defined as 'cz-prg.prod.surfshark.com'
2023-12-18 22:44:46 [INFO] VPN_PORT defined as '51820'
2023-12-18 22:44:46 [INFO] VPN_PROTOCOL set as 'udp', since WireGuard is always udp.
2023-12-18 22:44:46 [INFO] VPN_DEVICE_TYPE set as 'cz-prg'
2023-12-18 22:44:46 [INFO] Starting WireGuard...
--------------------
--------------------
[cont-init.d] 02-vpn.sh: exited 0.
[cont-init.d] 03-network.sh: executing... 
2023-12-18 22:44:46 [INFO] Adding fwmark for webui.
2023-12-18 22:44:46 [DEBUG] 'main' routing table defined as follows...
--------------------
default via 172.18.0.1 dev eth1 
10.0.1.0/24 dev eth0 proto kernel scope link src 10.0.1.21 
10.14.0.0/16 dev cz-prg proto kernel scope link src 10.14.0.2 
172.18.0.0/16 dev eth1 proto kernel scope link src 172.18.0.32 
--------------------
2023-12-18 22:44:46 [DEBUG] ip rules defined as follows...
--------------------
0:  from all lookup local
32763:  from all fwmark 0x1 lookup webui
32764:  from all lookup main suppress_prefixlength 0
32765:  not from all fwmark 0xca6c lookup 51820
32766:  from all lookup main
32767:  from all lookup default
--------------------
2023-12-18 22:44:46 [DEBUG] iptables table 'filter' defined as follows...
--------------------
-P INPUT DROP
-P FORWARD ACCEPT
-P OUTPUT DROP
-A INPUT -i cz-prg -m comment --comment "Accept input from tunnel adapter" -j ACCEPT
-A INPUT -s 10.0.1.0/24 -d 10.0.1.0/24 -m comment --comment "Accept input from internal Docker network" -j ACCEPT
-A INPUT -s 185.242.6.123/32 -i eth0 -p udp -m udp --sport 51820 -m comment --comment "Accept input of VPN gateway" -j ACCEPT
-A INPUT -s 185.152.64.165/32 -i eth0 -p udp -m udp --sport 51820 -m comment --comment "Accept input of VPN gateway" -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8080 -m comment --comment "Accept input to qBittorrent webui port" -j ACCEPT
-A INPUT -i lo -m comment --comment "Accept input to internal loopback" -j ACCEPT
-A OUTPUT -o cz-prg -m comment --comment "Accept output to tunnel adapter" -j ACCEPT
-A OUTPUT -s 10.0.1.0/24 -d 10.0.1.0/24 -m comment --comment "Accept output to internal Docker network" -j ACCEPT
-A OUTPUT -d 185.152.64.165/32 -o eth0 -p udp -m udp --dport 51820 -m comment --comment "Accept output of VPN gateway" -j ACCEPT
-A OUTPUT -d 185.242.6.123/32 -o eth0 -p udp -m udp --dport 51820 -m comment --comment "Accept output of VPN gateway" -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8080 -m comment --comment "Accept output from qBittorrent webui port" -j ACCEPT
-A OUTPUT -o lo -m comment --comment "Accept output from internal loopback" -j ACCEPT
--------------------
2023-12-18 22:44:46 [DEBUG] iptables table 'mangle' defined as follows...
--------------------
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A PREROUTING -p udp -m comment --comment "wg-quick(8) rule for cz-prg" -j CONNMARK --restore-mark --nfmask 0xffffffff --ctmask 0xffffffff
-A OUTPUT -p tcp -m tcp --dport 8080 -j MARK --set-xmark 0x1/0xffffffff
-A OUTPUT -p tcp -m tcp --sport 8080 -j MARK --set-xmark 0x1/0xffffffff
-A POSTROUTING -p udp -m mark --mark 0xca6c -m comment --comment "wg-quick(8) rule for cz-prg" -j CONNMARK --save-mark --nfmask 0xffffffff --ctmask 0xffffffff
--------------------
[cont-init.d] 03-network.sh: exited 0.
[cont-init.d] 04-qbittorrent-setup.sh: executing... 
2023-12-18 22:44:46 [WARNING] ENABLE_SSL is set to , SSL is not enabled. This could cause issues with logging if other apps use the same Cookie name (SID).
2023-12-18 22:44:46 [WARNING] If you manage the SSL config yourself, you can ignore this.
2023-12-18 22:44:46 [WARNING] UMASK not defined (via -e UMASK), defaulting to '002'
[cont-init.d] 04-qbittorrent-setup.sh: exited 0.
[cont-init.d] 05-install.sh: executing... 
[cont-init.d] 05-install.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
2023-12-18 22:44:46 [INFO] Logging to /config/qBittorrent/data/logs/qbittorrent.log.
[services.d] done.
2023-12-18 22:44:46 [INFO] Trying to ping 1.1.1.1 and 8.8.8.8 over the docker interface for 500ms each...
2023-12-18 22:44:48 [INFO] Success: Could not connect. This means the firewall is most likely working properly.
2023-12-18 22:44:49 [INFO] qBittorrent started with PID 546
2023-12-18 22:44:49 [INFO] HEALTH_CHECK_HOST is not set. Using default host one.one.one.one
2023-12-18 22:44:49 [INFO] HEALTH_CHECK_INTERVAL is not set. Using default interval of 5s
2023-12-18 22:44:49 [INFO] HEALTH_CHECK_TIMEOUT is not set. Using default interval of 5s
2023-12-18 22:45:09 [NOTICE] Network seems to be down. Retrying..
2023-12-18 22:45:09 [ERROR] Network is down. Exiting..
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Looping over and over.

Trigus42 commented 10 months ago

Can you try again with the the newest image?

Alfagun74 commented 10 months ago

already switched to a gluetun-qbittorrent-setup my man im sorry

Trigus42 commented 10 months ago

Tbf I took quite long to respond. So don't worry.
Then I'll close this issue