Home Assistant addon : qbittorrent (supports openvpn & smb mounts)

Sorry, i missed to set this thread to watching and missed all of your replies.
It is solved since version 4.5.2-r0-ls250, login with whitelist is possible again. Thank you Alex!

EDIT: Just updated to the 4.5.2-r0-ls250-2 and i found the reason for the message. Normally i just update an addon and it restarts itself and works (so i thought). But with this addon, i have to manually restart the addon, without it i get the unauthorized error (as posted above), after a restart all is fine.
Typically PEBKAC :joy:

Argh so strange… I could add an option to prevent auto restart after addon though :slight_smile: but not sure if it will help or be an issue with most people

after last update i see that qbittorent set download path to /config/addons_config/Downloads, no matter what in SavePath. If i try to set download directory in qb UI, it will be reset after restart. Is it known issue?

Hi, so you define it in the addon options but it didn’t work? Could you please post your log? Thanks

conf

DNS_server: 8.8.8.8,1.1.1.1
PGID: "0"
PUID: "0"
SavePath: /mnt/downloads
Username: admin
certfile: fullchain.pem
customUI: vuetorrent
keyfile: privkey.pem
ssl: false
whitelist: localhost,127.0.0.1,172.30.0.0/16,192.168.0.0/16
cifsdomain: WORKGROUP
cifspassword: ****
cifsusername: plex
networkdisks: //192.168.88.2/downloads

logs

[migrations] started
[migrations] no migrations found
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: Qbittorrent
 qBittorrent is a bittorrent client
-----------------------------------------------------------
───────────────────────────────────────
      β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ•‘     β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘      
      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
      β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•β•β•β• 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    0
User GID:    0
───────────────────────────────────────
 Add-on version: 4.5.2-r0-ls250-5
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.3.5
 Home Assistant Supervisor: 2023.03.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
 https://github.com/alexbelgium/hassio-addons
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/00-folders.sh
cont-init: info: /etc/cont-init.d/00-folders.sh exited 0
cont-init: info: running /etc/cont-init.d/01-custom_script.sh
[01:00:45] INFO: Execute /config/addons_autoscripts/qbittorrent.sh if existing
[01:00:45] INFO: ... no script found
cont-init: info: /etc/cont-init.d/01-custom_script.sh exited 0
cont-init: info: running /etc/cont-init.d/30-nginx.sh
cont-init: info: /etc/cont-init.d/30-nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/90-dns_set.sh
[01:00:47] INFO: DNS SERVERS set to 1.1.1.1 8.8.8.8 
cont-init: info: /etc/cont-init.d/90-dns_set.sh exited 0
cont-init: info: running /etc/cont-init.d/91-qbittorrent_configuration.sh
[01:00:47] INFO: Downloads can be found in /mnt/downloads
[01:00:48] INFO: Whitelisted subsets will not require a password : localhost,127.0.0.1,172.30.0.0/16,192.168.0.0/16
[01:00:48] INFO: WEBUI username set to admin
[01:00:48] INFO: Alternate UI enabled : vuetorrent. If webui don't work, disable this option
[01:00:51] INFO: Default username/password : admin/adminadmin
[01:00:51] INFO: Configuration can be found in /config/addons_config/qBittorrent
cont-init: info: /etc/cont-init.d/91-qbittorrent_configuration.sh exited 0
cont-init: info: running /etc/cont-init.d/92-local_mounts.sh
cont-init: info: /etc/cont-init.d/92-local_mounts.sh exited 0
cont-init: info: running /etc/cont-init.d/92-smb_mounts.sh
Mounting smb share(s)...
Using domain WORKGROUP
Using PUID 0 and PGID 0
[01:00:56] INFO: ... //192.168.88.2/downloads successfully mounted to /mnt/downloads with options ,vers=1.0,noserverino
cont-init: info: /etc/cont-init.d/92-smb_mounts.sh exited 0
cont-init: info: running /etc/cont-init.d/93-openvpn.sh
[01:00:56] INFO: Direct connection without VPN enabled
cont-init: info: /etc/cont-init.d/93-openvpn.sh exited 0
[custom-init] No custom files found, skipping...
WebUI will be started shortly after internal preparations. Please wait...
services-up: info: copying legacy longrun nginx (no readiness notification)
[ls.io-init] done.
[01:00:59] INFO: Starting NGinx...
1 Like

Thanks, I’ve pushed a new version that should correct it. At least tested on my system. Thanks for reporting!

Thanks for rocket fix)

1 Like

Last update to qBittorrent 4.5.3 completely destroys my HA setup. I’ve submitted an issue at qBittorrent 4.5.3 breaks Home Assistant on Rpi4 Β· Issue #94013 Β· home-assistant/core Β· GitHub but was told it’s for core issues only, couldn’t find the right place for the ticket so I’ll ask here.

The 4.5.3 update causes my Rpi4 HA setup to reboot, afterwards it becomes irresponsive, looks like supervisor can’t start properly. Some pages work, but no add-on is available nor any restore option. I can’t check system logs for details on the issue. Moreover, my local network becomes so overloaded, various system begin to report network outage. The only way to remedy is completely re-install NA and restore it from the previous backup.

My qBittorrent setup uses VPM and Samba drives, here’s the configuration:

DNS_server: 8.8.8.8,1.1.1.1
PGID: "0"
PUID: "0"
SavePath: /mnt/downloads
Username: admin
certfile: fullchain.pem
customUI: vuetorrent
keyfile: privkey.pem
ssl: false
whitelist: localhost,127.0.0.1,172.30.0.0/16,192.168.0.0/16
openvpn_enabled: true
openvpn_config: XXXXXX.ovpn
openvpn_username: XXXXXX
openvpn_password: XXXXXX
networkdisks: //192.168.XX.XXX/video/downloads
cifsusername: XXXXXX
cifspassword: XXXXXX
silent: true

I’m sure it works elsewhere just fine, could it be specific combination of VPN and Samba that renders the new version hung?

Hi, this is strange, I do not have this issue! Everything works fine on mine. This is indeed quite inconvenient!

Do oyu have an addon log that could be shown? I’ll do a test on my system

I might try but it has to wait till weekend as I will have to reinstall everything again. There are several logs, one in qBittorrent directory isn’t the same as shown in the add-on log tab, I’ll try to collect whatever I find. If you could suggest locations for logs it would be awesome.
Thank you for offering to look into the issue

This is really surprising (in addition to inconvenient) to need to reinstall everything… Isn’t it a matter of free space remaining? As normally when you reboot the system, the add-on should be stopped so the only way it can affect the system would be through potential leftover files.

Or could it be an issue with SD card?

The main log is transient and only shown in the add-on log… Which could be not accessible if the system hangs when the add-on runs

I’ve seen lsio has published a new qbittorrent image for 4.5.3, I’ll update to see if it changes something

I have Kingston 120GB SSD, not an SD card, with 90%+ free space it can’t be because of storage

1 Like

I’ve narrowed the problem down a bit. I’ve updated HA to the latest version, tried the latest qBittorrent patch, same result, HA reboots, network flooded, etc. Then I’ve removed QBT completely and installed the update with vanilla configuration. This worked, albeit QTB UI was giving me a big red warning about using old configuration options (even for vanilla install, and there was no data which options are now β€œold”). Then I’ve added OpenVPN config, QBT restarted ok. Lastly, I added β€œnetworkdisks”/β€œcif” parameters - and ka-boom. I have Synology NAS with shared folders, works perfectly fine with QBT 4.5.2 but apparently not with 4.5.3

I’ve also found this thread - Updated, entire network crashing - this is exactly what happens with my system, however in my case the culprit is the lasted QBT and my router is ASUS. It looks like HA is prone to this β€œnetwork flood” issue, not necessarily related to the latest HA version.

Indeed… If the issue is a network flood linked to the addon however it shouldn’t affect your HA when starting (if the addon is started) or if internet is disconnected, right ?

Are you on HAos, or a virtual machine ? As from the thread you were refering it seems that ajusting network parameters could help

I’m on Rpi 4, HAOS 10

This is from another thread, Home Assistant OS 10 update has broken my Pi 4b 4GB - #28 by Deckoz2302

From what I can tell, it seems like smbv1/CIFS is deprecated entirely and causes the system to crash when trying to mount.

If have add-ons using SMBv1/cifs, if you can plug directly into the host and use the cli even if it’s only for 20-30seconds before the system crashes and reboots. Try to disable the add ons utilizing CiFS, and the system should boot or not crash long enough to bring up the main HA container, and the webui, at which point you can disable those add-ons on boot.

Need to submit a bug in alexbelgium repo to update the smb/cifs method used in the containers

Just wonder if you ever got the issue submitted

My add-ons actually try all smb versions starting from 3 and only using smbv1 if the user himself is using it. For example some routers such as fritzbox only use smbv1. Si it seems more on the user side.,. On my own system I use the cifs method and never had issues. I use the samba nas add-on that publishes all disks on smb

However, something did change between 4.5.2 and 4.5.3 qBittorrent versions, the latter skips smb3 and smb2, despite NAS support. Assuming it’s the real culprit, it’s definitely QBT’s regression

I’ve just tried disabling smb1 support on my Synology NAS (enabled by default) and an update to QBT 4.5.3 went without an issue. So smb1 is without a doubt the root cause. While we may argue that it’s a β€œclient side fault”, the real problem is with QBT 4.5.3 skipping smb3 or smb2 protocol versions on NAS and only connecting at smb1 level. It wasn’t happening in 4.5.2, and if I may suggest should be fixed as many network servers support smb1 out of the box, or at very least documenting the smb version requirement

1 Like

Great, thanks. I’ve pushed a new version with updated logic please let me know how that goes

It was jumping from trying with smb v3 to v1 while skipping v2, which is now corrected