Issues with Deluge on Truenas 12-u2

danzelx

Cadet
Joined
Mar 27, 2021
Messages
1
I'm not entirely sure who is updating community plugins but the script that installs deluge isn't installing libtorrent-rasterbar resulting in a broken install.

within shell this will fix deluge and allow it to start in deluge-web

pkg install libtorrent-rasterbar
 

tuliomgui

Cadet
Joined
Aug 29, 2022
Messages
1
Does anyone have an update on this matter? I'm newbie and I am trying to install deluge plugin on TrueNas TrueNAS-13.0-U1.1, but whenever I try to install it an error message pops up and the installation is cancelled with the following error message

Error: Deluge had a failure Exception: RuntimeError Message: pkg error: - py39-libtorrent-rasterbar : Refusing to fetch artifact and run post_install.sh! Partial plugin destroyed


I've googled for a solution but I found nothing relevant... Any ideas?

I attached my TrueNas version and the error message that pops up when installing deluge.

Thanks!
 

Attachments

  • apagar1.jpg
    apagar1.jpg
    26 KB · Views: 99
  • apagar2.jpg
    apagar2.jpg
    16.7 KB · Views: 100

yozart

Dabbler
Joined
Mar 5, 2016
Messages
20
I'm facing the same issue do you have any piece of solution ?

Finally, I was able to install deluge by following and adapting below scripts (cf Code portion below with all details compiled) :
1. https://raw.githubusercontent.com/jsegaert/iocage-my-plugins/master/deluge-pip.json
2. https://github.com/jsegaert/iocage-plugin-deluge-pip/blob/master/post_install.sh
3. https://dev.deluge-torrent.org/wiki/UserGuide/Service/FreeBSD

First create a new Jail named "Deluge" with version Freebsd 12.3. Then ssh to your truenas and go into your jail:
# Connect to the jail iocage console Deluge # Install all needed packages pkg update pkg install ca_root_nss pkg install python39 pkg install py39-pip pkg install py39-pillow pkg install libtorrent-rasterbar pkg install rust # Prepare the system pw useradd -n deluge -u 8675309 -m -c "Deluge BitTorrent Client" -s /usr/sbin/nologin -w no mkdir -p /home/deluge/.config/deluge chown -R deluge:deluge /home/deluge/ mkdir /Downloads chown deluge:deluge /Downloads # Install the packages pip install --upgrade pip pip install deluge # Configure the services sysrc -f /etc/rc.conf deluged_enable="YES" sysrc -f /etc/rc.conf deluged_user="deluge" sysrc -f /etc/rc.conf deluge_web_enable="YES" sysrc -f /etc/rc.conf deluge_web_user="deluge" #create service executables cd /usr/local/etc/ mkdir rc.d ee deluged <paste the script from ressource (3) section DELUGED>, save and exit ee deluge_web <paste the script from ressource (3) section WEB UI>, save and exit [COLOR=rgb(20, 20, 20)]chmod +x deluged chmod +x deluge_web[/COLOR] # Start the services service deluged start service deluge_web start
 
Last edited:

yozart

Dabbler
Joined
Mar 5, 2016
Messages
20
I'm updating the code in previous post each time I'm able to progress.

Current issue is when I execute "service deluged start"

Error message is :
Starting deluged.
root@Deluge:/usr/local/etc/rc.d # Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/deluge/_libtorrent.py", line 21, in <module>
import deluge.libtorrent as lt
ModuleNotFoundError: No module named 'deluge.libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/deluge/_libtorrent.py", line 24, in <module>
import libtorrent as lt
ModuleNotFoundError: No module named 'libtorrent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/deluged", line 8, in <module>
sys.exit(start_daemon())
File "/usr/local/lib/python3.9/site-packages/deluge/core/daemon_entry.py", line 87, in start_daemon
from deluge.core.daemon import is_daemon_running
File "/usr/local/lib/python3.9/site-packages/deluge/core/daemon.py", line 19, in <module>
from deluge.core.core import Core
File "/usr/local/lib/python3.9/site-packages/deluge/core/core.py", line 26, in <module>
from deluge._libtorrent import LT_VERSION, lt
File "/usr/local/lib/python3.9/site-packages/deluge/_libtorrent.py", line 26, in <module>
raise LibtorrentImportError('No libtorrent library found: %s' % (ex))
deluge.error.LibtorrentImportError: No libtorrent library found: No module named 'libtorrent'

Still having issues with this libtorrent :/ Any idea how to fix ?
From what I saw, the issue is with the binding of the libtorrent library with python
I wasn't able to find anythng on this topic
 
Last edited:

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
The plugins are pretty much broken. @danb35 had brought up this topic recently, so I would defer him for additional details.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Plugins on CORE are a dead feature walking. They've never really been robust, and iX has now thrown in the towel on them:
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Plugins on CORE are a dead feature walking. They've never really been robust, and iX has now thrown in the towel on them:
This particular one doesn't really have anything to do with CORE plugins. It's just a plain FreeBSD issue. It's broken on my laptop also running vanilla FreeBSD.

The Deluge plugin has been broken for a long time now (since July) due to broken dependency (py-libtorrent-rasterbar).
Here's a thread I started on the FreeBSD forums. https://forums.freebsd.org/threads/deluge-port-missing.85801/
I just switched to using transmission instead cause it's been so long, I basically lost hope that it will be fixed. I mean, I even tried to build it straight from source through the ports tree and it still doesn't build. Probably can only get it to build if I revert to earlier commit hash, which I can't be bothered to do.

I haven't used the plugins too much cause I prefer managing my jails myself, but the few times I did use it for nextcloud and transmission, they actually worked pretty well.

Also, I actually still have an old jail with a working deluge. The key is to not update the port lol and it will continue to work fine though obviously that's kind of sub-optimal.
 
Last edited:

1ccs-todd

Dabbler
Joined
Aug 7, 2013
Messages
28
here is a working solution, modified from above.
Code:
# Connect to the jail
iocage console Deluge

# Install all needed packages
pkg update
pkg install ca_root_nss python39 py39-boost-libs py39-chardet py39-distro py39-mako py39-pillow py39-pip py39-twisted py39-rencode py39-setproctitle py39-xdg b2 libtorrent-rasterbar portdowngrade rust subversion

# Prepare the system
pw useradd -n deluge -u 8675309 -m -c "Deluge BitTorrent Client" -s /usr/sbin/nologin -w no
mkdir -p /home/deluge/.config/deluge
chown -R deluge:deluge /home/deluge/

mkdir /Downloads
chown deluge:deluge /Downloads

# Install the packages
pip install --upgrade pip
pip install deluge

# install working py-libtorrent-rasterbar from ports
portsnap fetch update
portdowngrade net-p2p/py-libtorrent-rasterbar r569235
cd ./py-libtorrent-rasterbar
make install clean

# Configure the services
sysrc -f /etc/rc.conf deluged_enable="YES"
sysrc -f /etc/rc.conf deluged_user="deluge"

sysrc -f /etc/rc.conf deluge_web_enable="YES"
sysrc -f /etc/rc.conf deluge_web_user="deluge"

#create service executables
cd /usr/local/etc/
mkdir rc.d
ee deluged
<paste the script from ressource (3) section DELUGED>, save and exit
ee deluge_web
<paste the script from ressource (3) section WEB UI>, save and exit
chmod +x deluged
chmod +x deluge_web


# Start the services
service deluged start
service deluge_web start

uses deluge-cli from pip installer, py-libtorrent-rasterbar from ports, and packages.
 
Last edited:

FindingFilene

Dabbler
Joined
Nov 25, 2020
Messages
20
Hi, everybody. Sharing this just because I still would need help.
I have TrueNAS 12.0-U7 at the moment installing into a FreeBSD 12.3 jail. I plan on upgrading soon. Before then, I'm trying to run @1ccs-todd's script, and I'm getting the following error at the 'portdowngrade' step. Sharing just in case it helps somebody else. I'm not sure if I'm going to try @yozart's script before upgrading. Thank you, everybody.

PS: TrueNAS upgrading to SCALE, @danb35 --are community recommendations for docker containers available, now that basically all of Docker is available? I think not. I'm pretty sure there's going to be no standard for users to go by, aside from a bunch of forum posts about how to configure their docker installs. I hope Docker gets decentralized.

Code:
portdowngrade net-p2p/py-libtorrent-rasterbar r569235
make: "/usr/share/mk/bsd.port.mk" line 32: Cannot open /usr/ports/Mk/bsd.port.mk
make: Fatal errors encountered -- cannot continue[: make:: unexpected operator
Usage: /usr/local/sbin/portdowngrade [-r] port-directory|port [revision/date]

When called without a revision to restore, svn log is called on the port's
directory so that relevant revisions can be identified.  Look for lines
containing "Update to X.X".  You may wish to filter it through less.

When called with a port name instead of directory/origin, INDEX is grepped
for the correct origins and a list is presented.

When called with -r, make describe is called in the restored port and all
of the ports that the restored port depended on are also checked out at the
same date.

This software requires that a ports tree has been fetched and is present
in
make: stopped in /root.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
are community recommendations for docker containers available, now that basically all of Docker is available? I think not.
Yeah, those would be the prepackaged apps. What parallel do you see between plugins on CORE and "basically all of Docker"?
 

FindingFilene

Dabbler
Joined
Nov 25, 2020
Messages
20
Yeah, those would be the prepackaged apps. What parallel do you see between plugins on CORE and "basically all of Docker"?
I think that anything that comes pre-packaged is something recommended by iXsystems, you know? Like how it had "Community" and "iX" on CORE. How will iX make recommendations of community-approved Docker packages? If there's a topic about this, I'd like to go there. I can only imagine there are some packages iX won't approve of combining together.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It's highly unlikely iX will do anything at all with "Docker packages." SCALE uses apps, which are (behind the scenes) Helm charts. iX has a catalog; TrueCharts has a much larger catalog. You could, I guess, roughly compare those to the iX and Community plugins, respectively. There may be other app catalogs, but I haven't run across them yet.

Now, SCALE does give you the ability to launch arbitrary Docker images, but you're pretty much on your own there.
 

1ccs-todd

Dabbler
Joined
Aug 7, 2013
Messages
28
the error listed is because ports tree is not installed to pull the downgrade from.
use "portsnap fetch extract" to install it.
also, for 12.x jail on 13.x system, these edits may be needed:
 

FindingFilene

Dabbler
Joined
Nov 25, 2020
Messages
20
It's highly unlikely iX will do anything at all with "Docker packages." SCALE uses apps, which are (behind the scenes) Helm charts. iX has a catalog; TrueCharts has a much larger catalog. You could, I guess, roughly compare those to the iX and Community plugins, respectively. There may be other app catalogs, but I haven't run across them yet.

Now, SCALE does give you the ability to launch arbitrary Docker images, but you're pretty much on your own there.

So, I just installed the TrueCharts helm charts, and they are spectacular and awesome for my purposes. I can't decentralize Docker myself, but TrueCharts does a good job bringing all sorts of open-source libraries and Docker images to my server. I'm stunned at how many new softwares I can use thanks to them, softwares I had no idea existed until TrueCharts brought them. :smile:
 

yozart

Dabbler
Joined
Mar 5, 2016
Messages
20
here is a working solution, modified from above.
Code:
# Connect to the jail
iocage console Deluge

# Install all needed packages
pkg update
pkg install ca_root_nss python39 py39-boost-libs py39-chardet py39-distro py39-mako py39-pillow py39-pip py39-twisted py39-rencode py39-setproctitle py39-xdg b2 libtorrent-rasterbar portdowngrade rust subversion

# Prepare the system
pw useradd -n deluge -u 8675309 -m -c "Deluge BitTorrent Client" -s /usr/sbin/nologin -w no
mkdir -p /home/deluge/.config/deluge
chown -R deluge:deluge /home/deluge/

mkdir /Downloads
chown deluge:deluge /Downloads

# Install the packages
pip install --upgrade pip
pip install deluge

# install working py-libtorrent-rasterbar from ports
portsnap fetch update
portdowngrade net-p2p/py-libtorrent-rasterbar r569235
cd ./py-libtorrent-rasterbar
make install clean

# Configure the services
sysrc -f /etc/rc.conf deluged_enable="YES"
sysrc -f /etc/rc.conf deluged_user="deluge"

sysrc -f /etc/rc.conf deluge_web_enable="YES"
sysrc -f /etc/rc.conf deluge_web_user="deluge"

#create service executables
cd /usr/local/etc/
mkdir rc.d
ee deluged
<paste the script from ressource (3) section DELUGED>, save and exit
ee deluge_web
<paste the script from ressource (3) section WEB UI>, save and exit
chmod +x deluged
chmod +x deluge_web


# Start the services
service deluged start
service deluge_web start

uses deluge-cli from pip installer, py-libtorrent-rasterbar from ports, and packages.
Worked perfectly ! thank you for this solution
 
Top