Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Unable to install qBittorrent search plugins

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

ciacnorris

Neophyte
Joined
Nov 8, 2020
Messages
6
I have installed qBittorrent via the Community plugin.
I have more or less the problem described here: https://www.truenas.com/community/threads/qbittorrent-plugin-search-engine-dont-work.77872/
Like I do normally on qBittorrent, I tried the “Check for updates” button to populate the Search plugins list, and nothing happened.
I tried “Install new plugin” via URL and nothing happened.
I have tried this fix https://www.truenas.com/community/threads/qbittorrent-searchplugin.85878/ (
Code:
pkg install python
) and nothing changed.
I have tried this other fix https://github.com/freenas/iocage-ix-plugins/issues/201 (use rc.conf to start the plugin instead of rc.local: comment qbittorrent line in rc.local and add qbittorrent_enable="YES" in rc.conf file) and nothing changed.
What should I do?
 

Grinas

Member
Joined
May 4, 2017
Messages
100
That did not work for me on 12.2 release

I found the issue was to do with the location of qbittorrent data. If you install using a plugin you wont be able to install the search plugins but if you just create a jail and install qbittorrent-nox and python3 you wont have any issues.

Code:
# craete a new jail called new_qbittorrent using latest release and have it auto start and get IP via dhcp
iocage create -n new_qbittorrent -r LATEST vnet=1 dhcp=1 boot=1
# access the new qbittorrent jail via console
iocage console new_qbittorrent
# install qbittorrent and python3
pkg install qbittorrent-nox lang/python3
# configure qbittorrent at start
echo "qbittorrent_enable=YES" >> /etc/rc.conf


then stop both qbitttorrents and just copy the data from your existing qbittorrent jail to the new one by doing the following.
Code:
iocage stop old_qbitttorrent
iocage stop new_qbittorrent
# qbit existing torrents copy data
cp -R /mnt/<IOCAGE-DATASET>/iocage/jails/<EXISTING_QBIT_NAME>/root/.local/share/qBittorrent/* /mnt/<IOCAGE-DATASET>/iocage/jails/<NEW_QBIT_NAME>/root/var/db/qbittorrent/conf/qBittorrent/data/

# qbit copy config
cp -R /mnt/<IOCAGE-DATASET>/iocage/jails/<EXISTING_QBIT_NAME>/root/.config/qBittorrent/* /mnt/<IOCAGE-DATASET>/iocage/jails/<NEW_QBIT_NAME>/root/var/db/qbittorrent/conf/qBittorrent/config/


Attahch the mounts to the new qbittorrent either using webUI or commandline and start the new jail
Code:
iocage start new_qbittorrent


Browse to qbittorent url e.g http://IP_ADDRESS:8080 and login using credentials if requested.

Click search and then search plugins

7

Check for updates after u should see search plugins
8
 

peter2cfu

Member
Joined
May 14, 2020
Messages
25
Just thought I update this as it been driving me batty, I'm using TrueNAS-12.0-STABLE

I added these lines to the /etc/rc.conf, via the jails shell, add to the bottom of the file, reboot then the search plugins should work if all goes well.

Code:
# Enable Qbittorrent
qbittorrent_enable="YES"

# https://github.com/Socrates-sys/FreeNasPluginPythonFix, helped but also misleading
PATH="$PATH:/usr/local/bin" && /usr/local/bin/qbittorrent-nox -d

more than happy to share my config information if you're still facing issues.

As a side issue, the instructions for creating the jails from scratch (which is my advice) from 'Grinas' did not work fully for me I had to create the jail via the GUI, to get things working, other than that they were perfect.

P.S having the ability to search from within the application is fantastic, I now start making my own search engines plugins for sites that I use.
 
Last edited:

Grinas

Member
Joined
May 4, 2017
Messages
100
P.S having the ability to search from within the application is fantastic, I now start making my own search engines plugins for sites that I use.

Why not create a jail for jackett and use that instead of creating your own plugins.
 

peter2cfu

Member
Joined
May 14, 2020
Messages
25
Why not create a jail for Jackett and use that instead of creating your own plugins.
Thanks for the heads up I have just installed and is working on the same jail as Qbittorrent, however its integration into Qbittorrent is a mystery.

TrueNAS: Jackett Manual Install
How to configure Jackett plugin

Jackett-output.PNG


No matter what I do cannot integrate into Qbittorrent, seems to be some sort of combination issue with the plugin.

Any advice?



.
 
Last edited:

winnielinnie

Senior Member
Joined
Oct 22, 2019
Messages
470
For those who want to be able to use Search Plugins using the Community qBittorrent Plugin (rather than a manually-constructed jail), you can get it working by doing the following inside the plugin's jail:

Code:
mv -v /etc/rc.local /etc/rc.local.original
echo 'PATH=$PATH:/usr/local/sbin:/usr/local/bin' >> /etc/rc.local
echo 'export PATH' >> /etc/rc.local
echo '/usr/local/bin/qbittorrent-nox -d' >> /etc/rc.local
cp -v /etc/rc.local /etc/rc.local.searchpluginfix

Make sure to use single-quotes and double-check the commands. I incorporated it the best I could from reading about this bug report on the qBittorrent GitHub. (These are similar steps to the article posted above by @mogorva , but it doesn't require you to access your iocage dataset through any type of share, and it keeps it all simplified in sequential commands in the jail's Shell.)

What the above steps do:
  1. Rename / backup the original rc.local file as rc.local.original
  2. Include all correct PATH variables before launching the qbittorrent daemon
  3. Export the PATH variables before launching the qbittorrent daemon
  4. Intentionally launch the qbittorrent daemon after the PATH variables are defined and exported
  5. Make a copy of this newly created rc.local as rc.local.searchpluginfix in case you need it for future use or the original gets overwritten from an update

Now just restart your qBittorrent Plugin, and try adding a search engine, such as:

No need to manually create your own jail from scratch if you prefer to keep using the Community Plugin. :smile: Enjoy!
 
Last edited:

Grinas

Member
Joined
May 4, 2017
Messages
100
whats the actual issue you are getting. Does it not return any results when you search from qbittorrent?

All you need to do is add your IP and API key to the jackett.json plugin config in qbittorrent.

here is my congfig

Code:
root@qbit:~ # cat /var/db/qbittorrent/conf/qBittorrent/data/nova3/engines/jackett.json
{
    "api_key": "ppocpie7a6c4wd6txw3vxbbm3g40emps",
    "tracker_first": false,
    "url": "http://jt:80"
}


Enter the IP or domain name in my case of the jacket server along with the api key into the jackett.json. If your running it on the same host then use localhost with the port you have it running on.
Enable the plugin in qbittorrent and then select it or all plugins to do the search with.

 

peter2cfu

Member
Joined
May 14, 2020
Messages
25
whats the actual issue you are getting. Does it not return any results when you search from qbittorrent?

All you need to do is add your IP and API key to the jackett.json plugin config in qbittorrent.

here is my congfig

Code:
root@qbit:~ # cat /var/db/qbittorrent/conf/qBittorrent/data/nova3/engines/jackett.json
{
    "api_key": "ppocpie7a6c4wd6txw3vxbbm3g40emps",
    "tracker_first": false,
    "url": "http://jt:80"
}
I was getting connectivity errors with the plugin, I deleted the Jail and rebuilt it from scratch, qbittorrent jacket plugin kept on asking me to goto https://github.com/qbittorrent/search-plugins/wiki/How-to-configure-Jackett-plugin for install instructions.

Seems my real issue was that the jackett.json file was not where it was expected to be., I'm guessing I screwed up the original install in some ways.

Thank you sincerely, you've been a tremendous help.

/.local/share/qBittorrent/nova3/engines/jackett.json
Code:
{
    "api_key": "h18vb6pri2isan8t0zw44o64zjq81d7u",
    "tracker_first": false,
    "url": "http://127.0.0.1:9117"
}


Works a treat....
 
Last edited:

peter2cfu

Member
Joined
May 14, 2020
Messages
25
Seem I spoke too soon, everything else works but for some reason, every few hours the QbTorrent config resets to default, everything else seems fine! all my configs are intact jacket work in standalone, but the linkage between qbtorrent and jack is now lost same error as before:

Jackett-error.PNG
it's not looking like a rollback most perplexing.

The config in /.config/qBittorrent/qbittorrent.conf has be reset to this:
Code:
[Preferences]
Connection\PortRangeMin=39730
Queueing\QueueingEnabled=false

I did recreate it as a test, it's the right location?
Code:
[AutoRun]
enabled=false
program=

[Preferences]
Advanced\IgnoreLimitsLAN=true
Advanced\RecheckOnCompletion=false
Advanced\trackerPort=9000
Connection\GlobalDLLimit=900
Connection\GlobalDLLimitAlt=700
Connection\GlobalUPLimit=500
Connection\GlobalUPLimitAlt=400
Connection\PortRangeMin=39730
Connection\ResolvePeerCountries=true
Downloads\FinishedTorrentExportDir=/mnt/download/finished/
Downloads\SavePath=/mnt/download/
Downloads\ScanDirsV2=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0\x1e\0/\0m\0n\0t\0/\0t\0\x65\0m\0p\0/\0\x61\0u\0t\0o\0/\0\0\0\x2\0\0\0\0)
Downloads\TempPath=/mnt/temp/
Downloads\TempPathEnabled=true
Downloads\TorrentExportDir=/mnt/temp/live_torrents/
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=0
DynDNS\Username=
General\Locale=
MailNotification\email=logs@cfts.co
MailNotification\enabled=true
MailNotification\password=xxxx-xxx-xxxxx
MailNotification\req_auth=true
MailNotification\req_ssl=true
MailNotification\sender=download@cfts.co
MailNotification\smtp_server=mail2.cfts.co
MailNotification\username=logs@cfts.co
Queueing\QueueingEnabled=false
Scheduler\Enabled=true
Scheduler\days=2
Scheduler\end_time=@Variant(\0\0\0\xf\x4J\xa2\0)
Scheduler\start_time=@Variant(\0\0\0\xf\x1\xb7t\0)
WebUI\Address=*
WebUI\AlternativeUIEnabled=false
WebUI\AuthSubnetWhitelist=172.16.198.64/24
WebUI\AuthSubnetWhitelistEnabled=true
WebUI\BanDuration=3600
WebUI\CSRFProtection=true
WebUI\ClickjackingProtection=true
WebUI\CustomHTTPHeaders=
WebUI\CustomHTTPHeadersEnabled=false
WebUI\HTTPS\CertificatePath=
WebUI\HTTPS\Enabled=false
WebUI\HTTPS\KeyPath=
WebUI\HostHeaderValidation=true
WebUI\LocalHostAuth=true
WebUI\MaxAuthenticationFailCount=5
WebUI\Port=80
WebUI\RootFolder=
WebUI\SecureCookie=true
WebUI\ServerDomains=*
WebUI\SessionTimeout=3600
WebUI\UseUPnP=true
WebUI\Username=admin

[RSS]
AutoDownloader\DownloadRepacks=true
AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})"
 
Last edited:

Grinas

Member
Joined
May 4, 2017
Messages
100
Seem I spoke too soon, everything else works but for some reason, every few hours the QbTorrent config resets to default, everything else seems fine! all my configs are intact jacket work in standalone, but the linkage between qbtorrent and jack is now lost same error as before:
weird. you sure you have the correct permissions on the plugin files ?
 

peter2cfu

Member
Joined
May 14, 2020
Messages
25
weird. you sure you have the correct permissions on the plugin files ?
Seems that was the issue, no idea why, it used to work fine, maybe something I not done right when I resetup the jail.
Code:
load_rc_config $name
: ${qbittorrent_enable="NO"}
: ${qbittorrent_conf_dir="/var/db/qbittorrent/conf"}
: ${qbittorrent_download_dir="/var/db/qbittorrent/Downloads"}
#: ${qbittorrent_user=qbittorrent}
#: ${qbittorrent_group=qbittorrent}
: ${qbittorrent_user=root}
: ${qbittorrent_group=wheel}
 
Top