hassio-addons: [Qbittorrent] Stuck searching for metadata - Requires a restart

Which addon?

  • Addon name : Qbittorrent
  • Addon version : release-4.4.1-ls173-9

Describe the bug

Unfortunately, this is the kind of bug that… just happens. I use OpenVPN within this addon and that’s my best guess as the reason behind it getting stuck. Basically, what happens is that the addon can work fine even for days (or for hours), then it no longer goes beyond the search for metadata for a newly added download. Restarting the addon fixes the issue.

I noticed a change in the release names:

  • release-4.4.1-ls172 (20-02-2022)
  • (07-01-2022)
  • (04-01-2022)

and I think this behaviour didn’t happen with the old naming schema.

Full addon log

[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.
 Add-on: Qbittorrent
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-aaa_dockerfile_backup.sh: executing...
[cont-init.d] 00-aaa_dockerfile_backup.sh: exited 0.
[cont-init.d] 00-banner.sh: executing...
 qBittorrent is a bittorrent client
 Add-on version: release-4.4.1-ls173-9
 You are running the latest version of this add-on.
 System: Home Assistant OS 7.6  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2022.3.8
 Home Assistant Supervisor: 2022.03.5
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 01-migrations: executing...
[migrations] started
[migrations] no migrations found
[cont-init.d] 01-migrations: exited 0.
[cont-init.d] 02-tamper-check: executing...
[cont-init.d] 02-tamper-check: exited 0.
[cont-init.d] 10-adduser: executing...
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
To support LSIO projects visit:
[14:05:58] INFO: DNS SERVERS set to
[14:05:59] INFO: Downloads can be found in /share/qBittorrent
User uid:    0
User gid:    0
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 30-nginx.sh: executing...
[cont-init.d] 30-nginx.sh: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 90-dns_set.sh: executing...
[cont-init.d] 90-dns_set.sh: exited 0.
[cont-init.d] 91-qbittorrent_configuration.sh: executing...
[14:05:59] INFO: Whitelisted subsets will not require a password : localhost,,,
[14:06:00] INFO: WEBUI username set to qBTadmin
[14:06:00] INFO: Alternate UI enabled : vuetorrent. If webui don't work, disable this option
[14:06:02] INFO: Default username/password : admin/adminadmin
[14:06:02] INFO: Configuration can be found in /config/qBittorrent
[cont-init.d] 91-qbittorrent_configuration.sh: exited 0.
[cont-init.d] 92-local_mounts.sh: executing...
[cont-init.d] 92-local_mounts.sh: exited 0.
[14:06:03] INFO: Configuring openvpn
[14:06:04] INFO: openvpn correctly set, qbittorrent will run tunnelled through openvpn
[cont-init.d] 92-smb_mounts.sh: executing...
[cont-init.d] 92-smb_mounts.sh: exited 0.
[cont-init.d] 93-openvpn.sh: executing...
[cont-init.d] 93-openvpn.sh: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2022-04-06 14:06:04 DEPRECATED OPTION: --cipher set to 'AES-128-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-128-CBC' to --data-ciphers or change --cipher 'AES-128-CBC' to --data-ciphers-fallback 'AES-128-CBC' to silence this warning.
2022-04-06 14:06:04 OpenVPN 2.5.4 aarch64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Nov 15 2021
2022-04-06 14:06:04 library versions: OpenSSL 1.1.1l  24 Aug 2021, LZO 2.10
2022-04-06 14:06:04 WARNING: --ping should normally be used with --ping-restart or --ping-exit
[14:06:06] INFO: Starting NGinx...
2022-04-06 14:06:04 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2022-04-06 14:06:04 TCP/UDP: Preserving recently used remote address: [AF_INET]a1.a2.a3.a4:8041
2022-04-06 14:06:04 Socket Buffers: R=[212992->212992] S=[212992->212992]
2022-04-06 14:06:04 UDP link local: (not bound)
2022-04-06 14:06:04 UDP link remote: [AF_INET]a1.a2.a3.a4:8041
2022-04-06 14:06:04 TLS: Initial packet from [AF_INET]a1.a2.a3.a4:8041, sid=63011c3f fd929d2d
2022-04-06 14:06:04 VERIFY OK: depth=2, C=US, O=Internet Security Research Group, CN=ISRG Root X1
2022-04-06 14:06:04 VERIFY OK: depth=1, C=US, O=Let's Encrypt, CN=R3
2022-04-06 14:06:04 VERIFY KU OK
2022-04-06 14:06:04 Validating certificate extended key usage
2022-04-06 14:06:04 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2022-04-06 14:06:04 VERIFY EKU OK
2022-04-06 14:06:04 VERIFY X509NAME OK: CN=something.us
2022-04-06 14:06:04 VERIFY OK: depth=0, CN=something.us
2022-04-06 14:06:04 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1601', remote='link-mtu 1569'
2022-04-06 14:06:04 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1532', remote='tun-mtu 1500'
2022-04-06 14:06:04 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
2022-04-06 14:06:04 [something.us] Peer Connection Initiated with [AF_INET]a1.a2.a3.a4:8041
2022-04-06 14:06:05 SENT CONTROL [something.us]: 'PUSH_REQUEST' (status=1)
2022-04-06 14:06:05 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS,dhcp-option DNS,explicit-exit-notify,sndbuf 16384,rcvbuf 262144,dhcp-option DISABLE-NBT,redirect-gateway def1 bypass-dhcp,route-delay 5,inactive 172800 2048,route-gateway,topology subnet,ping 10,ping-restart 120,compress lz4-v2,ifconfig,peer-id 0,cipher AES-256-GCM'
2022-04-06 14:06:05 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
2022-04-06 14:06:05 OPTIONS IMPORT: timers and/or timeouts modified
2022-04-06 14:06:05 OPTIONS IMPORT: explicit notify parm(s) modified
2022-04-06 14:06:05 OPTIONS IMPORT: compression parms modified
2022-04-06 14:06:05 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
2022-04-06 14:06:05 Socket Buffers: R=[212992->425984] S=[212992->32768]
2022-04-06 14:06:05 OPTIONS IMPORT: --ifconfig/up options modified
2022-04-06 14:06:05 OPTIONS IMPORT: route options modified
2022-04-06 14:06:05 OPTIONS IMPORT: route-related options modified
2022-04-06 14:06:05 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2022-04-06 14:06:05 OPTIONS IMPORT: peer-id set
2022-04-06 14:06:05 OPTIONS IMPORT: adjusting link_mtu to 1656
2022-04-06 14:06:05 OPTIONS IMPORT: data channel crypto options modified
2022-04-06 14:06:05 Data Channel: using negotiated cipher 'AES-256-GCM'
2022-04-06 14:06:05 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-04-06 14:06:05 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2022-04-06 14:06:05 ROUTE_GATEWAY IFACE=eth0 HWADDR=32:12:ad:1f:41:4f
2022-04-06 14:06:05 TUN/TAP device tun0 opened
2022-04-06 14:06:05 /sbin/ip link set dev tun0 up mtu 1500
2022-04-06 14:06:05 /sbin/ip link set dev tun0 up
2022-04-06 14:06:05 /sbin/ip addr add dev tun0
2022-04-06 14:06:05 /etc/openvpn/up.sh tun0 1500 1584 init

Full addon config


  • Supervisor version: supervisor-2022.03.5
  • Host system version: Home Assistant OS 7.6

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 27 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Unfortunately, the issue is not fixable with a restart. I also tried restoring older versions. Might have something to do with my VPN. Thank you, as usual, for your prompt response ❤️

Maybe, in hassio-addons/qbittorrent/rootfs/etc/services.d/nginx/run, you should replace

bashio::log.info "VPN is up and running with ip $(curl -s ipecho.net/plain), based in country : $COUNTRY"

with something like

bashio::log.info "VPN is up and running with ip $(cat /vpnip), based in country : $COUNTRY"


OK, I’ll adapt it 😉

Great! I like it now!

OK, I’ll adapt it 😉

Thanks for the feedback.

I’ve created an optional “silent” boolean. If you check it, it removes all qbittorrent non-errors from the log (>/dev/null) and removes the nginx access logs (off;)

Update: fine tuning .ovpn parameters, including setting ping-restart 60, was a success. No more container restarts needed. For completeness, there were two more major changes:

  1. Your image was updated to a newer version.
  2. I changed line 37 of /rootfs/etc/nginx/nginx.conf to access_log off;. This way, logs were much more readable (I never found much use for nginx access logs there), and, who knows?, that might have been the real fix 😄

By the way: it would be fantastic if setting line 37 of that file to off became a configuration option. Until then, I will always manually do that.

Thank you, as usual 😃

Thanks for the feedback! Let me know if it worked! It would be interesting if it works to try also with the normal mode, as it is more secure

Ok. I applied the changes to the .ovpn file I provided, and warnings are now gone. I am currently using your “openvpn_alt_mode”. I’ll let you know if things improve. Thank you so far 😄

Interesting! Only now, I think I discovered that OpenVPN options are not defined by you, but are in the .ovpn file defined in the ‘openvpn_config’ option. I’m going to change that now, and see if things improve 😃

I see. Thank you @alexbelgium 😃

Hi, indeed the shift from qbittorrent 4.3.9 to 4.4.1 was a really big change that induced lots of issues. I don’t have much time for the moment but when I’ll have time I’ll check if there is open issues similar to yours either in linuxserver’s qbittorrent github repo (that have made the upstream image that I have converted in addon) and the qbittorrent github repo (where the dev of 4.4.1 is ongoing)