binhex / arch-qbittorrentvpn

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

Broken pipe in qbittorrent.sh #224

Open jt196 opened 4 months ago

jt196 commented 4 months ago

So this is docker container version 4.6.3-1-02.

I tried updating recently from image 4.5.2-1-01 and it doesn't appear to be able to start the qbt image.

These are my env variables:

    environment:
      - VPN_ENABLED=yes
      - VPN_USER=<purevpn_user>
      - VPN_PASS=<purevpn_pass>
      - VPN_PROV=custom
      - VPN_CLIENT=openvpn
      - STRICT_PORT_FORWARD=yes
      - ENABLE_PRIVOXY=yes
      - ENABLE_STARTUP_SCRIPTS=no
      - LAN_NETWORK=192.168.1.77/24
      - NAME_SERVERS=1.1.1.1,1.0.0.1
      - ADDITIONAL_PORTS=54763
      - DEBUG=true
      - WEBUI_PORT=<web_ui_port>
      - UMASK=000
      - PUID=1029
      - PGID=100
      - CREATE_TUN_DEVICE=true

The 4.5 container works just fine, but when I try to update it, it doesn't work properly.

The only other issues I can see might be these configs in the docker-compose file:

    devices:
      - /dev/net/tun
    privileged: true
    restart: always
    cap_add:
      - NET_ADMIN

Log

192.168.64.2    d17dabaed6a0
2024-02-28 10:57:20,467 DEBG 'start-script' stdout output:
2024-02-28 10:57:20.466779 [debug] Docker interface name, Gateway interface name, Gateway IP, Docker interface IP, Subnet mask and CIDR are defined as 'eth0,eth0,192.168.64.1,192.168.64.2,255.255.240.0,192.168.64.0/20'
2024-02-28 10:57:20,481 DEBG 'start-script' stdout output:
[info] Adding 192.168.1.77/24 as route via adapter eth0
2024-02-28 10:57:20,483 DEBG 'start-script' stderr output:
RTNETLINK answers: Invalid argument
2024-02-28 10:57:20,484 DEBG 'start-script' stdout output:
[info] ip route defined as follows...
--------------------
2024-02-28 10:57:20,487 DEBG 'start-script' stdout output:
default via 192.168.64.1 dev eth0 
192.168.64.0/20 dev eth0 proto kernel scope link src 192.168.64.2 
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1 
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 
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1 
broadcast 192.168.64.0 dev eth0 table local proto kernel scope link src 192.168.64.2 
local 192.168.64.2 dev eth0 table local proto kernel scope host src 192.168.64.2 
broadcast 192.168.79.255 dev eth0 table local proto kernel scope link src 192.168.64.2 
2024-02-28 10:57:20,487 DEBG 'start-script' stdout output:
unreachable default dev lo proto kernel metric 4294967295 error 4294967195 pref medium
unreachable default dev lo proto kernel metric 4294967295 error 4294967195 pref medium
2024-02-28 10:57:20,488 DEBG 'start-script' stdout output:
--------------------
2024-02-28 10:57:20,489 DEBG 'start-script' stdout output:
[debug] Modules currently loaded for kernel
2024-02-28 10:57:20,494 DEBG 'start-script' stdout output:
Module                  Size  Used by
nfnetlink               5680  1
xfrm_user              23856  1
xfrm_algo               5223  1 xfrm_user
xt_ipvs                 2323  0
ip_vs_rr                1511  0
ip_vs                 123660  3 ip_vs_rr,xt_ipvs
xt_mark                 1381  2
iptable_mangle          1656  1
br_netfilter           13234  0
bridge                 56556  1 br_netfilter
stp                     1757  1 bridge
aufs                  203276  0
macvlan                13686  0
veth                    5102  0
xt_conntrack            3323  1
xt_addrtype             3078  1
nf_conntrack_ipv6       6725  0
nf_defrag_ipv6          6359  1 nf_conntrack_ipv6
ip6table_filter         1596  0
ip6_tables             14761  1 ip6table_filter
ipt_MASQUERADE          1277  65
xt_REDIRECT             1486  0
nf_nat_masquerade_ipv4     2048  1 ipt_MASQUERADE
xt_nat                  2093  155
iptable_nat             1959  30
nf_nat_ipv4             4775  1 iptable_nat
nf_nat_redirect         1395  1 xt_REDIRECT
nf_nat                 10925  4 nf_nat_redirect,nf_nat_ipv4,xt_nat,nf_nat_masquerade_ipv4
xt_recent               8550  0
xt_iprange              1712  0
xt_limit                2095  0
xt_state                1477  0
xt_tcpudp               2543  245
xt_multiport            1830  0
xt_LOG                  1487  0
nf_conntrack_ipv4      11726  2
nf_defrag_ipv4          1539  1 nf_conntrack_ipv4
nf_conntrack           63024  8 ip_vs,nf_nat,xt_state,nf_nat_ipv4,xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_ipv4,nf_conntrack_ipv6
iptable_filter          1592  3
ip_tables              14106  5 iptable_filter,iptable_mangle,iptable_nat
x_tables               17360  19 ip6table_filter,xt_ipvs,xt_iprange,xt_mark,xt_recent,ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_limit,xt_state,xt_conntrack,xt_LOG,xt_nat,xt_multiport,iptable_filter,xt_REDIRECT,iptable_mangle,ip6_tables,xt_addrtype
fuse                   86222  0
tun                    19049  0
8021q                  18204  0
vhost_scsi             29966  1
vhost                  29993  1 vhost_scsi
tcm_loop               15471  1
iscsi_target_mod      278865  1
target_core_user       28374  0
target_core_ep         57456  2
target_core_multi_file    35749  1
target_core_file       60381  1
target_core_iblock     23597  1
target_core_mod       918060  22 target_core_iblock,target_core_multi_file,vhost,iscsi_target_mod,target_core_ep,target_core_file,target_core_user,vhost_scsi,tcm_loop
syno_extent_pool     1387505  0
rodsp_ep               92824  3 target_core_multi_file,syno_extent_pool,target_core_file
udf                    82014  0
isofs                  33252  0
synoacl_vfs            17150  1
btrfs                1228996  1
ecryptfs               85774  1 btrfs
zstd_decompress        62829  1 btrfs
zstd_compress         146689  1 btrfs
xxhash                  4547  2 zstd_compress,zstd_decompress
raid456               116650  1
async_raid6_recov       5510  1 raid456
async_memcpy            1726  2 raid456,async_raid6_recov
async_pq                4868  2 raid456,async_raid6_recov
async_xor               3489  3 async_pq,raid456,async_raid6_recov
xor                    10808  2 btrfs,async_xor
async_tx                2167  5 async_pq,raid456,async_xor,async_memcpy,async_raid6_recov
raid6_pq               97204  4 async_pq,raid456,btrfs,async_raid6_recov
leds_lp3943             4920  0
aesni_intel           175384  0
glue_helper             3957  1 aesni_intel
lrw                     3605  1 aesni_intel
gf128mul                5702  1 lrw
ablk_helper             2076  1 aesni_intel
syno_hddmon             2059  0
apollolake_synobios    80918  0
hid_generic             1321  0
usbhid                 26639  0
hid                    90151  2 hid_generic,usbhid
usblp                  11420  0
i915                 1313594  0
drm_kms_helper        120569  1 i915
syscopyarea             3198  1 drm_kms_helper
sysfillrect             3562  1 drm_kms_helper
sysimgblt               2239  1 drm_kms_helper
fb_sys_fops             1442  1 drm_kms_helper
cfbfillrect             3
2024-02-28 10:57:20,497 DEBG 'start-script' stdout output:
690  1 drm_kms_helper
cfbcopyarea             3198  1 drm_kms_helper
cfbimgblt               2239  1 drm_kms_helper
drm                   311765  3 i915,drm_kms_helper
drm_panel_orientation_quirks     3665  1 drm
iosf_mbi                4234  1 i915
fb                     35222  2 i915,drm_kms_helper
fbdev                   1030  1 fb
video                  27369  1 i915
backlight               6155  2 i915,video
button                  5216  1 i915
uhci_hcd               22126  0
ehci_pci                3999  0
ehci_hcd               42184  1 ehci_pci
usb_storage            49770  0
r8168                 533100  0
i2c_algo_bit            5569  1 i915
zram                   19235  4
igb                   176108  0
e1000e                174331  0
sg                     26967  0
dm_snapshot            29813  0
dm_bufio               14696  1 dm_snapshot
crc_itu_t               1531  1 udf
crc_ccitt               1531  0
psnap                   1917  0
p8022                   1243  0
llc                     3569  4 stp,p8022,psnap,bridge
hfsplus                94651  0
md4                     4465  0
hmac                    3089  0
sit                    15725  0
tunnel4                 2389  1 sit
ipv6                  322778  707 sit,ip_vs,nf_defrag_ipv6,nf_conntrack_ipv6
flashcache_syno       268295  1
flashcache             81886  0
syno_flashcache_control     1167  2 flashcache_syno,flashcache
dm_mod                 91262  11 flashcache_syno,dm_bufio,flashcache,dm_snapshot
arc4                    2104  0
crc32c_intel           13190  1
cryptd                  7897  2 aesni_intel,ablk_helper
ecb                     2177  0
aes_x86_64              7503  1 aesni_intel
authenc                 4268  0
des_generic            16797  0
ansi_cprng              4156  0
cts                     4342  0
md5                     3153  0
cbc                     2776  0
cpufreq_powersave       1126  0
cpufreq_performance     1130  4
acpi_cpufreq            6557  0
processor              27030  1 acpi_cpufreq
cpufreq_stats           2929  0
vxlan                  33245  0
ip6_udp_tunnel          1967  1 vxlan
udp_tunnel              2355  1 vxlan
ip_tunnel              12442  1 sit
loop                   20132  0
sha256_generic         11353  0
synorbd                71633  0
synofsbd               17617  0
etxhci_hcd             85428  0
xhci_pci                4714  0
xhci_hcd              112083  1 xhci_pci
usbcore               202075  9 etxhci_hcd,usblp,uhci_hcd,usb_storage,ehci_hcd,ehci_pci,usbhid,xhci_hcd,xhci_pci
usb_common              2286  1 usbcore
2024-02-28 10:57:20,510 DEBG 'start-script' stdout output:
iptable_mangle          1656  1
ip_tables              14106  5 iptable_filter,iptable_mangle,iptable_nat
x_tables               17360  19 ip6table_filter,xt_ipvs,xt_iprange,xt_mark,xt_recent,ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_limit,xt_state,xt_conntrack,xt_LOG,xt_nat,xt_multiport,iptable_filter,xt_REDIRECT,iptable_mangle,ip6_tables,xt_addrtype
2024-02-28 10:57:20,511 DEBG 'start-script' stdout output:
[info] iptable_mangle support detected, adding fwmark for tables
2024-02-28 10:57:20,752 DEBG 'start-script' stdout output:
[info] iptables defined as follows...
--------------------
2024-02-28 10:57:20,754 DEBG 'start-script' stdout output:
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT -s 149.102.238.133/32 -i eth0 -j ACCEPT
-A INPUT -s 192.168.64.0/20 -d 192.168.64.0/20 -j ACCEPT
-A INPUT -s 149.102.238.133/32 -i eth0 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 8087 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 8087 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 54763 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 54763 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -d 192.168.64.0/20 -i eth0 -p tcp -m tcp --dport 8118 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i tun0 -j ACCEPT
-A OUTPUT -d 149.102.238.133/32 -o eth0 -j ACCEPT
-A OUTPUT -s 192.168.64.0/20 -d 192.168.64.0/20 -j ACCEPT
-A OUTPUT -d 149.102.238.133/32 -o eth0 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 8087 -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --sport 8087 -j ACCEPT
-A OUTPUT -o eth0 -p tcp -m tcp --sport 54763 -j ACCEPT
-A OUTPUT -o eth0 -p udp -m udp --sport 54763 -j ACCEPT
-A OUTPUT -s 192.168.64.0/20 -d 192.168.1.0/24 -o eth0 -p tcp -m tcp --sport 8118 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -o tun0 -j ACCEPT
2024-02-28 10:57:20,756 DEBG 'start-script' stdout output:
--------------------
2024-02-28 10:57:20,756 DEBG 'start-script' stdout output:
[debug] VPN remote configuration options as follows...
[debug] VPN remote server is defined as '149.102.238.133'
2024-02-28 10:57:20,757 DEBG 'start-script' stdout output:
[debug] VPN remote port is defined as '80'
[debug] VPN remote protocol is defined as 'tcp '
[debug] VPN remote ip is defined as '149.102.238.133'
2024-02-28 10:57:20,757 DEBG 'start-script' stdout output:
[debug] OpenVPN command line:- /usr/bin/openvpn --reneg-sec 0 --mute-replay-warnings --auth-nocache --setenv VPN_PROV 'custom' --setenv VPN_CLIENT 'openvpn' --setenv DEBUG 'true' --setenv VPN_DEVICE_TYPE 'tun0' --setenv VPN_ENABLED 'yes' --setenv VPN_REMOTE_SERVER '149.102.238.133' --setenv APPLICATION 'qbittorrent' --script-security 2 --writepid /root/openvpn.pid --remap-usr1 SIGHUP --log-append /dev/stdout --pull-filter ignore 'up' --pull-filter ignore 'down' --pull-filter ignore 'route-ipv6' --pull-filter ignore 'ifconfig-ipv6' --pull-filter ignore 'tun-ipv6' --pull-filter ignore 'dhcp-option DNS6' --pull-filter ignore 'persist-tun' --pull-filter ignore 'reneg-sec' --up /root/openvpnup.sh --up-delay --up-restart --keepalive 10 60 --auth-user-pass credentials.conf --cd /config/openvpn --config '/config/openvpn/CH-ovpn-tcp.ovpn' --remote 149.102.238.133 80 tcp  --remote-random
2024-02-28 10:57:20,758 DEBG 'start-script' stdout output:
[info] Starting OpenVPN (non daemonised)...
2024-02-28 10:57:21,907 DEBG 'start-script' stdout output:
2024-02-28 10:57:21 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations. 
2024-02-28 10:57:21,908 DEBG 'start-script' stdout output:
2024-02-28 10:57:21 WARNING: file 'credentials.conf' is group or others accessible
2024-02-28 10:57:21 OpenVPN 2.6.9 [git:makepkg/6640a10bf6d84eee+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO] built on Feb 13 2024
2024-02-28 10:57:21 library versions: OpenSSL 3.2.1 30 Jan 2024, LZO 2.10
2024-02-28 10:57:21,908 DEBG 'start-script' stdout output:
2024-02-28 10:57:21 DCO version: N/A
2024-02-28 10:57:21,909 DEBG 'start-script' stdout output:
2024-02-28 10:57:21 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2024-02-28 10:57:21,912 DEBG 'start-script' stdout output:
2024-02-28 10:57:21 TCP/UDP: Preserving recently used remote address: [AF_INET]149.102.238.133:80
2024-02-28 10:57:21 Attempting to establish TCP connection with [AF_INET]149.102.238.133:80
2024-02-28 10:57:21,953 DEBG 'start-script' stdout output:
2024-02-28 10:57:21 TCP connection established with [AF_INET]149.102.238.133:80
2024-02-28 10:57:21 TCPv4_CLIENT link local: (not bound)
2024-02-28 10:57:21 TCPv4_CLIENT link remote: [AF_INET]149.102.238.133:80
2024-02-28 10:57:22,245 DEBG 'start-script' stdout output:
2024-02-28 10:57:22 [Secure-Server] Peer Connection Initiated with [AF_INET]149.102.238.133:80
2024-02-28 10:57:23,577 DEBG 'start-script' stdout output:
2024-02-28 10:57:23 TUN/TAP device tun0 opened
2024-02-28 10:57:23 net_iface_mtu_set: mtu 1500 for tun0
2024-02-28 10:57:23,598 DEBG 'start-script' stdout output:
2024-02-28 10:57:23 net_iface_up: set tun0 up
2024-02-28 10:57:23 net_addr_v4_add: 10.8.50.16/27 dev tun0
2024-02-28 10:57:23 /root/openvpnup.sh tun0 1500 0 10.8.50.16 255.255.255.224 init
2024-02-28 10:57:23 Initialization Sequence Completed
2024-02-28 10:57:23,621 DEBG 'start-script' stdout output:
[debug] Waiting for valid VPN gateway IP addresses from tunnel...
[debug] Waiting for valid VPN adapter IP addresses from tunnel...
2024-02-28 10:57:24,638 DEBG 'start-script' stdout output:
[debug] Valid local IP address from tunnel acquired '10.8.50.16'
2024-02-28 10:57:24,639 DEBG 'start-script' stdout output:
[debug] Valid gateway IP address from tunnel acquired ''
2024-02-28 10:57:24,666 DEBG 'start-script' stdout output:
[debug] Checking we can resolve name 'www.google.com' to address...
2024-02-28 10:57:24,701 DEBG 'watchdog-script' stdout output:
[debug] Checking we can resolve name 'www.google.com' to address...
2024-02-28 10:57:25,136 DEBG 'start-script' stdout output:
[debug] DNS operational, we can resolve name 'www.google.com' to address '142.250.184.228'
2024-02-28 10:57:25,213 DEBG 'watchdog-script' stdout output:
[debug] DNS operational, we can resolve name 'www.google.com' to address '142.250.186.164'
2024-02-28 10:57:25,228 DEBG 'start-script' stdout output:
[info] Attempting to get external IP using 'http://checkip.amazonaws.com'...
2024-02-28 10:57:27,223 DEBG 'start-script' stdout output:
[info] Successfully retrieved external IP address 149.102.238.160
2024-02-28 10:57:27,243 DEBG 'start-script' stdout output:
[info] VPN provider 'custom' not supported for automatic port forwarding, skipping incoming port assignment
2024-02-28 10:57:27,247 DEBG 'watchdog-script' stdout output:
[debug] Waiting for iptables chain policies to be in place...
2024-02-28 10:57:27,264 DEBG 'watchdog-script' stdout output:
[debug] iptables chain policies are in place
2024-02-28 10:57:27,265 DEBG 'watchdog-script' stdout output:
[info] qBittorrent listening interface IP 0.0.0.0 and VPN provider IP 10.8.50.16 different, marking for reconfigure
2024-02-28 10:57:27,376 DEBG 'watchdog-script' stdout output:
[info] qBittorrent not running
2024-02-28 10:57:27,385 DEBG 'watchdog-script' stdout output:
[info] Privoxy not running
2024-02-28 10:57:27,577 DEBG 'watchdog-script' stdout output:
[info] qBittorrent config file already exists, skipping copy
[info] Removing session lock file (if it exists)...
2024-02-28 10:57:27,634 DEBG 'watchdog-script' stdout output:
[info] Attempting to start qBittorrent...
2024-02-28 10:57:27,644 DEBG 'watchdog-script' stdout output:
[debug] Waiting for qBittorrent process to start
[debug] Re-check in 1 secs...
[debug] 11 retries left
2024-02-28 10:57:28,655 DEBG 'watchdog-script' stdout output:
[info] qBittorrent process started
[info] Waiting for qBittorrent process to start listening on port 8087...
2024-02-28 10:57:29,377 DEBG 'watchdog-script' stderr output:
/home/nobody/qbittorrent.sh: line 70:   531 Broken pipe             timeout 10 yes
       532 Segmentation fault      (core dumped) | nohup /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" --profile=/config >> '/config/supervisord.log' 2>&1
Ivar418 commented 3 months ago

I also have the problem config: https://pastebin.com/7yEUNv89 Log: qbitovpn_logs.txt

Ivar418 commented 3 months ago

I fixed mine. I was using analready exsisting folder structure by the qbittorent standalone container. That version is differen (newer) and assiging a new fresh folder for this container fixed it. I copied BT_Backup and the logs and the .conf and it was all present in this container.

@jt196 Have you tried to start it in a new fresh folder?