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

Many thanks for this great addon.
I use it with an NFS mount thanks to the container’s startup script.
Do you think it could be possible to add wireguard support ?
With openvpn, I can’t exceed 40-45mbit, is this also your case?

After recent update to 4.5.4-2 I can no longer access the WebGUI. A message “502: Bad Gateway” appears instead of showing the GUI. I can only reproduce this if OpenVPN is enabled.

Any idea what could cause this and how to fix?

Since 1 week probably, i didn’t notice for a while, but i’m getting an error that stopping qbittorent from running, any ideas?

───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 0
User GID: 0
───────────────────────────────────────
You are running the latest version of this add-on.
System: Home Assistant OS 10.3 (amd64 / generic-x86-64)
Home Assistant Core: 2023.6.3
Home Assistant Supervisor: 2023.06.4

Please, share the above information when looking for help
or support in, e.g., GitHub, forums

Provided by: GitHub - alexbelgium/hassio-addons: My homeassistant addons

Defining permissions for main user :
User UID: 0
User GID : 0

Local Disks mounting…
lsblk: /dev/disk/by-label/dl: not a block device
[07:23:05] INFO: Execute /config/addons_autoscripts/qbittorrent.sh if existing
[07:23:05] INFO: … no script found
[07:23:06] INFO: DNS SERVERS set to 1.1.1.1 8.8.8.8
[07:23:06] INFO: Downloads can be found in /mnt/dl/downloads
[07:23:06] INFO: Whitelisted subsets will not require a password : localhost,127.0.0.1,172.30.0.0/16,192.168.0.0/16
[07:23:06] INFO: WEBUI username set to xxxxxxx
[07:23:06] INFO: Default username/password : admin/adminadmin
[07:23:06] INFO: Configuration can be found in /config/addons_config/qBittorrent
[07:23:06] INFO: Direct connection without VPN enabled
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

This fixed my issue: Solved: OpenVPN reconnect AUTH_FAILED | Netgate Forum

1 Like

not sure what would be relevant for me as “s6-rc: warning: unable to start service legacy-cont-init: command exited 1” or similar is not mentioned in the thread you referred, i’m not using any vpn, on some other forums i could read it is due to some deprecated functionality that is no longer being used/supported, however no idea how to resolve it.

ohh, solution is way different, actually the hdd died where it was running…

1 Like

Hi, actually I don’t use the add-on with vpn so I can’t really comment :slight_smile:

Have you tried the transmission one? I think it goes faster from what I heard

The latest version crashes HA completely after running for a few minutes. I did not have this issue in the past. Anyone else with the same problem?

Hard to say… It doesn’t do this to me. It seems HAos is prone to network flooding when behing VPN but I don’t know how I could help. Perhaps it would be more effective to have a bug report at HAos level rather than the addon ? I can’t replicate the issue on my system

You could also try transmission with openvpn that could be more efficient

1 Like

Yeah i am having problems too, exactly as described. Crashes HA entirely. I am no expert, but it seems to be related to network shares.

this is all i can grab before it crashes.

Using PUID 0 and PGID 0
/etc/cont-init.d/00-smb_mounts.sh: line 93:   275 Killed                  mount -t cifs -o "rw,file_mode=0775,dir_mode=0775,username=$CIFS_USERNAME,password=${CIFS_PASSWORD},nobrl$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAINVAR" "$disk" /mnt/"$diskname" 2> ERRORCODE
1 Like

Thanks! Does it still crash if not using an smb drive? Are you using smbv1?

Im not 100% sure, ill check properly when I get a chance today and get back to you.
But I think it is only happening when using network shares.

I briefly checked without a network share using openvpn last night, and the logs showed it trying to connect to the openvpn server. (never crashed) Though it didnt actually successfully connect, this step is well after it tries to mount a share if one is configured. If I had let it continue it would probably eventually have connected, and ran as expected.
But I was only interested in saving to a network share, so I stopped and tried reconfiguring the addon for SMB instead.

As for the version. I have not selected sambaV1 in the qbittorrent config and the server is a windows 10 machine, so i am assuming it is trying to use the newest samba version possible.

edit:

For some reason it started working fine now!
In the past I have tried reconfiguring it, uninstalling and reinstalling the addon… but for some reason after reconfiguring again now it just started working!? I didnt try anything new, i don’t know why this happened.
Feels like i just wasted your time.
Sorry.

I do not use network disks and I never configured them. I also did not try re-installing the addon. I might try to do that once I have some spare time…

Hello,

Thank you for this add on!

I have a question though. I can’t access qBittorent from the HA:8080 ip address.
I can’t configure sonarr and radarr.

Can anyone help me? I don’t see why it’s not working.

I still have this issue and it is also present with the Transmission add-on. When I start the add-on, whole HA crashes soon after it starts. I have no idea how to debug this :frowning:

Edit 1: It looks like it holds if I do not add any torrents though. I am starting to think whether this might be some sort of a power issue. I am using the HA Blue hardware (Odroid) and I use an external NVME SSD for the data and the download directory of the torrent addons. In addition to the SSD, I use a BT stick, Zigbee stick, and a W-MBUS stick. So maybe when the SSD starts draining a lot of power, the USB gets overloaded and the whole board crashes? But how would I verify this and why was this not happening in the past?

Edit 2: I do not think it is a power issue, because I very often put high loads on the SSD through Samba and other things. I also tried limiting the number of peers and the download/upload speed to ease the load on SSD, CPU, etc. The slower Transmission runs, the longer it takes to crash HA. But even with very slow download, it is a matter of minutes before whole HA crashes.

the admin/adminadmin user/pw combo isn’t working for me - I haven’t modified any of the config files. Is there something I might be doing wrong?

edit: restarted the add-on and it works now

1 Like

Connection: 1Gb/s
OS: Raspbian (Debian) 11
Drive: Kingston SSD
Raspi is overclocked to 2Ghz and has 8Gb of RAM.

First the issue was that I constantly dropped speed from 300-400Mbps to 20Mbps. Fixed it with this.

Now the issue is that I can’t get past 350 average download speed. Transferring from my Laptop to Raspi via SMB saturates the 1Gbps connection, so the router and SSD connection on Raspi are fine.
Downloading the same torrent on my Laptop gets 850-980Mbps sustained.

CPU usage on the Raspberry caps out at 75% max, so there’s at least the possibility for 25% more speed. I’m not using a VPN, so it doesn’t use any resources for decryption.

Any ideas how to further debug this? Just to be sure that I’m not missing something and do indeed get the full performance the Raspberry is capable of

I have a problem where I simply cannot log in. I’ve tried several browsers and devices.
I was never able to log in, and the password is not set anywhere, this is a clean install, but using admin and adminadmin as the login credentials always says login failed.
Is there a way to disable having to log in?

3 Likes

The default login info doesn’t seem to work on a fresh install. I fixed it by changing the WEBUI version to ‘default’ in the configuration, then it’ll skip the authentication when you access it locally.

The webui can’t be changed though, regardless of the setting it’s always ‘vuetorrent’. Not sure if this addon is very future proof considering these bugs don’t get fixed and nobody ever gets a reply in this topic.

This integration always stops working, entities become unavailable.
HA 2023.11.2 on RPi4
By entering the

host:port/api/v2/sync/maindata?rid=0

into my browser, a nice response is received, so I don’t understand what’s this

Max retries exceeded

error in logs:

Logger: homeassistant.components.qbittorrent.coordinator
Source: helpers/update_coordinator.py:303 
Integration: qBittorrent (documentation, issues) 
First occurred: November 18, 2023, 22:58:27 (501 occurrences) 
Last logged: 18:17:37

Error requesting qbittorrent data: HTTPConnectionPool(host='homeserver.local', port=8084): Max retries exceeded with url: /api/v2/sync/maindata?rid=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7125b510>: Failed to establish a new connection: [Errno 22] Invalid argument'))
Error requesting qbittorrent data: HTTPConnectionPool(host='homeserver.local', port=8084): Max retries exceeded with url: /api/v2/sync/maindata?rid=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5a496390>: Failed to establish a new connection: [Errno 22] Invalid argument'))
Error requesting qbittorrent data: HTTPConnectionPool(host='homeserver.local', port=8084): Max retries exceeded with url: /api/v2/sync/maindata?rid=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6976dc90>: Failed to establish a new connection: [Errno 22] Invalid argument'))
Error requesting qbittorrent data: HTTPConnectionPool(host='homeserver.local', port=8084): Max retries exceeded with url: /api/v2/sync/maindata?rid=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f84546250>: Failed to establish a new connection: [Errno 22] Invalid argument'))
Error requesting qbittorrent data: HTTPConnectionPool(host='homeserver.local', port=8084): Max retries exceeded with url: /api/v2/sync/maindata?rid=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f953c2810>: Failed to establish a new connection: [Errno 22] Invalid argument'))