binhex / arch-qbittorrentvpn

Docker build script for Arch Linux base with qBittorrent, Privoxy and OpenVPN
GNU General Public License v3.0
458 stars 48 forks source link

Container hangs after qbittorrent is listening on the webui port. #247

Closed monogoat closed 3 months ago

monogoat commented 3 months ago

Had a power outtage last night, after getting the Unraid server back up and running my torrent container is not working. Can't access webui, and it appears that there are more steps that should be occurring after the point it stops in the log. It is setup with wireguard to connect to PIA. Here is the log:

Created by...
___.   .__       .__
\_ |__ |__| ____ |  |__   ____ ___  ___
 | __ \|  |/    \|  |  \_/ __ \\  \/  /
 | \_\ \  |   |  \   Y  \  ___/ >    <
 |___  /__|___|  /___|  /\___  >__/\_ \
     \/        \/     \/     \/      \/
   https://hub.docker.com/u/binhex/

2024-06-29 16:42:37.812111 [info] Host is running unRAID
2024-06-29 16:42:37.850401 [info] System information Linux 17efb47387e1 6.1.79-Unraid #1 SMP PREEMPT_DYNAMIC Fri Mar 29 13:34:03 PDT 2024 x86_64 GNU/Linux
2024-06-29 16:42:37.897191 [info] PUID defined as '99'
2024-06-29 16:42:37.948635 [info] PGID defined as '100'
2024-06-29 16:42:37.999802 [info] UMASK defined as '000'
2024-06-29 16:42:38.040147 [info] Permissions already set for '/config'
2024-06-29 16:42:38.082435 [info] Deleting files in /tmp (non recursive)...
2024-06-29 16:42:38.143188 [info] VPN_ENABLED defined as 'yes'
2024-06-29 16:42:38.188801 [info] VPN_CLIENT defined as 'wireguard'
2024-06-29 16:42:38.229353 [info] VPN_PROV defined as 'pia'
2024-06-29 16:42:38.280496 [info] WireGuard config file (conf extension) is located at /config/wireguard/wg0.conf
2024-06-29 16:42:38.344787 [info] VPN_REMOTE_SERVER defined as 'nl-amsterdam.privacy.network'
2024-06-29 16:42:38.386912 [info] VPN_REMOTE_PORT defined as '1337'
2024-06-29 16:42:38.422817 [info] VPN_DEVICE_TYPE defined as 'wg0'
2024-06-29 16:42:38.467303 [info] VPN_REMOTE_PROTOCOL defined as 'udp'
2024-06-29 16:42:39.041649 [info] LAN_NETWORK defined as '10.0.0.0/16'
2024-06-29 16:42:39.087555 [info] LAN_NETWORK exported as '10.0.0.0/16'
2024-06-29 16:42:39.127966 [info] NAME_SERVERS defined as '84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1'
2024-06-29 16:42:39.167444 [info] VPN_USER defined as 'censored'
2024-06-29 16:42:39.207760 [info] VPN_PASS defined as 'censored'
2024-06-29 16:42:39.248074 [info] STRICT_PORT_FORWARD defined as 'yes'
2024-06-29 16:42:39.286126 [info] ENABLE_PRIVOXY defined as 'no'
2024-06-29 16:42:39.327688 [info] VPN_INPUT_PORTS not defined (via -e VPN_INPUT_PORTS), skipping allow for custom incoming ports
2024-06-29 16:42:39.370003 [info] VPN_OUTPUT_PORTS not defined (via -e VPN_OUTPUT_PORTS), skipping allow for custom outgoing ports
2024-06-29 16:42:39.411956 [info] ENABLE_STARTUP_SCRIPTS not defined (via -e ENABLE_STARTUP_SCRIPTS), defaulting to 'no'
2024-06-29 16:42:39.454042 [info] WEBUI_PORT defined as '8078'
2024-06-29 16:42:39.501942 [info] Starting Supervisor...
2024-06-29 16:42:39,751 INFO Included extra file "/etc/supervisor/conf.d/qbittorrent.conf" during parsing
2024-06-29 16:42:39,751 INFO Set uid to user 0 succeeded
2024-06-29 16:42:39,753 INFO supervisord started with pid 7
2024-06-29 16:42:40,757 INFO spawned: 'start-script' with pid 307
2024-06-29 16:42:40,759 INFO spawned: 'watchdog-script' with pid 308
2024-06-29 16:42:40,760 INFO reaped unknown pid 8 (exit status 0)
2024-06-29 16:42:40,769 DEBG 'start-script' stdout output:
[info] VPN is enabled, beginning configuration of VPN

2024-06-29 16:42:40,769 INFO success: start-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-06-29 16:42:40,769 INFO success: watchdog-script entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-06-29 16:42:40,772 DEBG 'start-script' stdout output:
[info] Adding 84.200.69.80 to /etc/resolv.conf

2024-06-29 16:42:40,776 DEBG 'start-script' stdout output:
[info] Adding 37.235.1.174 to /etc/resolv.conf

2024-06-29 16:42:40,780 DEBG 'start-script' stdout output:
[info] Adding 1.1.1.1 to /etc/resolv.conf

2024-06-29 16:42:40,784 DEBG 'start-script' stdout output:
[info] Adding 37.235.1.177 to /etc/resolv.conf

2024-06-29 16:42:40,789 DEBG 'start-script' stdout output:
[info] Adding 84.200.70.40 to /etc/resolv.conf

2024-06-29 16:42:40,794 DEBG 'start-script' stdout output:
[info] Adding 1.0.0.1 to /etc/resolv.conf

2024-06-29 16:42:41,115 DEBG 'start-script' stdout output:
[info] Adding 10.0.0.0/16 as route via adapter eth0

2024-06-29 16:42:41,118 DEBG 'start-script' stdout output:
[info] ip route defined as follows...
--------------------

2024-06-29 16:42:41,120 DEBG 'start-script' stdout output:
default via 172.17.0.1 dev eth0 
10.0.0.0/16 via 172.17.0.1 dev eth0 
172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.7 
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1 
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1 

2024-06-29 16:42:41,120 DEBG 'start-script' stdout output:
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1 
local 172.17.0.7 dev eth0 table local proto kernel scope host src 172.17.0.7 
broadcast 172.17.255.255 dev eth0 table local proto kernel scope link src 172.17.0.7 

2024-06-29 16:42:41,121 DEBG 'start-script' stdout output:
--------------------

2024-06-29 16:42:41,128 DEBG 'start-script' stdout output:
iptable_mangle         16384  1
ip_tables              28672  6 iptable_filter,iptable_raw,iptable_nat,iptable_mangle
x_tables               45056  15 ip6table_filter,xt_conntrack,iptable_filter,xt_tcpudp,xt_addrtype,xt_nat,xt_comment,ip6_tables,xt_connmark,iptable_raw,ip_tables,iptable_nat,xt_MASQUERADE,iptable_mangle,xt_mark

2024-06-29 16:42:41,129 DEBG 'start-script' stdout output:
[info] iptable_mangle support detected, adding fwmark for tables

2024-06-29 16:42:41,294 DEBG 'start-script' stdout output:
[info] iptables defined as follows...
--------------------

2024-06-29 16:42:41,297 DEBG 'start-script' stdout output:
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT -s 143.244.41.138/32 -i eth0 -j ACCEPT
-A INPUT -s 195.78.54.74/32 -i eth0 -j ACCEPT
-A INPUT -s 195.78.54.107/32 -i eth0 -j ACCEPT
-A INPUT -s 172.64.151.73/32 -i eth0 -j ACCEPT
-A INPUT -s 104.18.36.183/32 -i eth0 -j ACCEPT
-A INPUT -s 104.18.159.201/32 -i eth0 -j ACCEPT
-A INPUT -s 104.19.240.167/32 -i eth0 -j ACCEPT
-A INPUT -s 172.17.0.0/16 -d 172.17.0.0/16 -j ACCEPT
-A INPUT -s 143.244.41.138/32 -i eth0 -j ACCEPT
-A INPUT -s 195.78.54.74/32 -i eth0 -j ACCEPT
-A INPUT -s 195.78.54.107/32 -i eth0 -j ACCEPT
-A INPUT -s 172.64.151.73/32 -i eth0 -j ACCEPT
-A INPUT -s 104.18.36.183/32 -i eth0 -j ACCEPT
-A INPUT -s 104.18.159.201/32 -i eth0 -j ACCEPT
-A INPUT -s 104.19.240.167/32 -i eth0 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8078 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 8078 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i wg0 -j ACCEPT
-A OUTPUT -d 143.244.41.138/32 -o eth0 -j ACCEPT
-A OUTPUT -d 195.78.54.74/32 -o eth0 -j ACCEPT
-A OUTPUT -d 195.78.54.107/32 -o eth0 -j ACCEPT
-A OUTPUT -d 172.64.151.73/32 -o eth0 -j ACCEPT
-A OUTPUT -d 104.18.36.183/32 -o eth0 -j ACCEPT
-A OUTPUT -d 104.18.159.201/32 -o eth0 -j ACCEPT
-A OUTPUT -d 104.19.240.167/32 -o eth0 -j ACCEPT
-A OUTPUT -s 172.17.0.0/16 -d 172.17.0.0/16 -j ACCEPT
-A OUTPUT -d 143.244.41.138/32 -o eth0 -j ACCEPT
-A OUTPUT -d 195.78.54.74/32 -o eth0 -j ACCEPT
-A OUTPUT -d 195.78.54.107/32 -o eth0 -j ACCEPT
-A OUTPUT -d 172.64.151.73/32 -o eth0 -j ACCEPT
-A OUTPUT -d 104.18.36.183/32 -o eth0 -j ACCEPT
-A OUTPUT -d 104.18.159.201/32 -o eth0 -j ACCEPT
-A OUTPUT -d 104.19.240.167/32 -o eth0 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8078 -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --sport 8078 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o wg0 -j ACCEPT

2024-06-29 16:42:41,299 DEBG 'start-script' stdout output:
--------------------

2024-06-29 16:42:41,302 DEBG 'start-script' stdout output:
[info] Configuring WireGuard...

2024-06-29 16:42:41,460 DEBG 'start-script' stdout output:
[info] Token generated for PIA wireguard authentication

2024-06-29 16:42:41,466 DEBG 'start-script' stdout output:
[info] Trying to connect to the PIA WireGuard API on 'nl-amsterdam.privacy.network'...

2024-06-29 16:42:42,595 DEBG 'start-script' stdout output:
[info] Attempting to bring WireGuard interface 'up'...

2024-06-29 16:42:42,612 DEBG 'start-script' stderr output:
Warning: `/config/wireguard/wg0.conf' is world accessible

2024-06-29 16:42:42,628 DEBG 'start-script' stderr output:
[#] ip link add wg0 type wireguard

2024-06-29 16:42:42,632 DEBG 'start-script' stderr output:
[#] wg setconf wg0 /dev/fd/63

2024-06-29 16:42:42,637 DEBG 'start-script' stderr output:
[#] ip -4 address add 10.9.222.104 dev wg0

2024-06-29 16:42:42,652 DEBG 'start-script' stderr output:
[#] ip link set mtu 1420 up dev wg0

2024-06-29 16:42:42,678 DEBG 'start-script' stderr output:
[#] wg set wg0 fwmark 51820

2024-06-29 16:42:42,681 DEBG 'start-script' stderr output:
[#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820

2024-06-29 16:42:42,685 DEBG 'start-script' stderr output:
[#] ip -4 rule add not fwmark 51820 table 51820

2024-06-29 16:42:42,688 DEBG 'start-script' stderr output:
[#] ip -4 rule add table main suppress_prefixlength 0

2024-06-29 16:42:42,697 DEBG 'start-script' stderr output:
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1

2024-06-29 16:42:42,702 DEBG 'start-script' stderr output:
[#] iptables-restore -n

2024-06-29 16:42:42,707 DEBG 'start-script' stderr output:
[#] '/root/wireguardup.sh'

2024-06-29 16:42:43,979 DEBG 'start-script' stdout output:
[info] Attempting to get external IP using 'http://checkip.amazonaws.com'...

2024-06-29 16:42:44,401 DEBG 'start-script' stdout output:
[info] Successfully retrieved external IP address 143.244.41.138

2024-06-29 16:42:44,402 DEBG 'start-script' stdout output:
[info] Script started to assign incoming port for 'pia'

2024-06-29 16:42:44,402 DEBG 'start-script' stdout output:
[info] Port forwarding is enabled
[info] Checking endpoint 'nl-amsterdam.privacy.network' is port forward enabled...

2024-06-29 16:42:44,404 DEBG 'start-script' stdout output:
[info] WireGuard interface 'up'

2024-06-29 16:42:44,945 DEBG 'start-script' stdout output:
[info] PIA endpoint 'nl-amsterdam.privacy.network' is in the list of endpoints that support port forwarding shown below:-

2024-06-29 16:42:45,487 DEBG 'start-script' stdout output:
[info] List of PIA endpoints that support port forwarding:-

2024-06-29 16:42:45,487 DEBG 'start-script' stdout output:
[info] uk-manchester.privacy.network
[info] au-australia-so.privacy.network
[info] macau.privacy.network
[info] fi.privacy.network
[info] cambodia.privacy.network
[info] cyprus.privacy.network
[info] santiago.privacy.network
[info] gt-guatemala-pf.privacy.network
[info] lv.privacy.network
[info] al.privacy.network
[info] mk.privacy.network
[info] france.privacy.network
[info] austria.privacy.network
[info] au-sydney.privacy.network
[info] za.privacy.network
[info] rs.privacy.network
[info] hungary.privacy.network
[info] poland.privacy.network
[info] spain.privacy.network
[info] bo-bolivia-pf.privacy.network
[info] bangladesh.privacy.network
[info] nigeria.privacy.network
[info] jakarta.privacy.network
[info] nl-amsterdam.privacy.network
[info] saudiarabia.privacy.network
[info] in.privacy.network
[info] lu.privacy.network
[info] ee.privacy.network
[info] montenegro.privacy.network
[info] kualalumpur.privacy.network
[info] fi-2.privacy.network

2024-06-29 16:42:45,487 DEBG 'start-script' stdout output:
[info] israel.privacy.network
[info] taiwan.privacy.network
[info] de-frankfurt.privacy.network
[info] japan.privacy.network
[info] zagreb.privacy.network
[info] pt.privacy.network
[info] italy.privacy.network
[info] ec-ecuador-pf.privacy.network
[info] ca-ontario.privacy.network
[info] uk-london.privacy.network
[info] ca-montreal.privacy.network
[info] ba.privacy.network
[info] ca-ontario-so.privacy.network
[info] md.privacy.network

2024-06-29 16:42:45,488 DEBG 'start-script' stdout output:
[info] de-berlin.privacy.network
[info] sofia.privacy.network
[info] tr.privacy.network
[info] es-valencia.privacy.network
[info] pe-peru-pf.privacy.network
[info] is.privacy.network
[info] panama.privacy.network
[info] sk.privacy.network
[info] ca-toronto.privacy.network
[info] de-germany-so.privacy.network
[info] bogota.privacy.network
[info] china.privacy.network
[info] qatar.privacy.network
[info] monaco.privacy.network
[info] denmark-2.privacy.network
[info] egypt.privacy.network

2024-06-29 16:42:45,488 DEBG 'start-script' stdout output:
[info] bahamas.privacy.network
[info] venezuela.privacy.network
[info] aus-perth.privacy.network
[info] denmark.privacy.network
[info] slovenia.privacy.network
[info] no.privacy.network
[info] gr.privacy.network
[info] srilanka.privacy.network
[info] malta.privacy.network
[info] czech.privacy.network
[info] greenland.privacy.network
[info] kr-south-korea-pf.privacy.network
[info] yerevan.privacy.network
[info] sg.privacy.network
[info] br.privacy.network
[info] aus-melbourne.privacy.network
[info] morocco.privacy.network
[info] brussels.privacy.network
[info] mongolia.privacy.network
[info] np-nepal-pf.privacy.network
[info] uk-southampton.privacy.network

2024-06-29 16:42:45,488 DEBG 'start-script' stdout output:
[info] nl-netherlands-so.privacy.network
[info] ae.privacy.network
[info] ireland.privacy.network
[info] sweden-2.privacy.network
[info] ro.privacy.network
[info] japan-2.privacy.network
[info] lt.privacy.network
[info] nz.privacy.network
[info] italy-2.privacy.network
[info] ua.privacy.network
[info] uy-uruguay-pf.privacy.network
[info] ad.privacy.network
[info] philippines.privacy.network
[info] hk.privacy.network
[info] vietnam.privacy.network
[info] dz.privacy.network
[info] au-brisbane-pf.privacy.network
[info] swiss.privacy.network

2024-06-29 16:42:45,488 DEBG 'start-script' stdout output:
[info] mexico.privacy.network
[info] sanjose.privacy.network
[info] liechtenstein.privacy.network
[info] ar.privacy.network
[info] ca-vancouver.privacy.network
[info] kazakhstan.privacy.network
[info] uk-2.privacy.network
[info] man.privacy.network
[info] sweden.privacy.network
[info] au-adelaide-pf.privacy.network
[info] georgia.privacy.network

2024-06-29 16:42:47,810 DEBG 'start-script' stdout output:
[info] Successfully assigned and bound incoming port '45481'

2024-06-29 16:43:17,937 DEBG 'watchdog-script' stdout output:
[info] qBittorrent listening interface IP 0.0.0.0 and VPN provider IP 10.9.222.104 different, marking for reconfigure

2024-06-29 16:43:17,946 DEBG 'watchdog-script' stdout output:
[info] qBittorrent not running

2024-06-29 16:43:17,946 DEBG 'watchdog-script' stdout output:
[info] qBittorrent incoming port 6881 and VPN incoming port 45481 different, marking for reconfigure

2024-06-29 16:43:17,947 DEBG 'watchdog-script' stdout output:
[info] qBittorrent config file already exists, skipping copy
[info] Removing session lock file (if it exists)...

2024-06-29 16:43:17,984 DEBG 'watchdog-script' stdout output:
[info] Attempting to start qBittorrent...

2024-06-29 16:43:17,990 DEBG 'watchdog-script' stdout output:
[info] qBittorrent process started
[info] Waiting for qBittorrent process to start listening on port 8078...

2024-06-29 16:43:18,222 DEBG 'watchdog-script' stdout output:
[info] qBittorrent process listening on port 8078

Any ideas?

monogoat commented 3 months ago

Well nevermind I guess, left it off for a day and tried to start the container this afternoon and it worked fine.