Deluged service will not start

General support for problems installing or using Deluge
Post Reply
jesman1
New User
New User
Posts: 2
Joined: Sun Apr 23, 2023 3:33 am

Deluged service will not start

Post by jesman1 »

Hello, I have Deluge installed on my Linux box running Mint.

Code: Select all

NAME="Linux Mint"
VERSION="19.3 (Tricia)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.3"
VERSION_ID="19.3"
The Deluged service will not start after a long overdue full update of installed packages. Output of journalctl -u deluged.service

Code: Select all

Apr 22 23:43:11 Home-Share systemd[1]: Started Deluge Bittorrent Client Daemon.
Apr 22 23:43:11 Home-Share deluged[1730]: Traceback (most recent call last):
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/bin/deluged", line 11, in <module>
Apr 22 23:43:11 Home-Share deluged[1730]:     load_entry_point('deluge==2.1.1', 'gui_scripts', 'deluged')()
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 81, in start_daemon
Apr 22 23:43:11 Home-Share deluged[1730]:     parser = ArgParserBase()
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 178, in __init__
Apr 22 23:43:11 Home-Share deluged[1730]:     version='%(prog)s ' + _get_version_detail(),
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 89, in _get_version_detail
Apr 22 23:43:11 Home-Share deluged[1730]:     from deluge._libtorrent import LT_VERSION
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 30, in <module>
Apr 22 23:43:11 Home-Share deluged[1730]:     LT_VERSION = lt.__version__
Apr 22 23:43:11 Home-Share deluged[1730]: AttributeError: module 'libtorrent' has no attribute '__version__'
Apr 22 23:43:11 Home-Share deluged[1730]: Error in sys.excepthook:
Apr 22 23:43:11 Home-Share deluged[1730]: Traceback (most recent call last):
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 154, in apport_excepthook
Apr 22 23:43:11 Home-Share deluged[1730]:     os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
Apr 22 23:43:11 Home-Share deluged[1730]: FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_deluged.1000.crash'
Apr 22 23:43:11 Home-Share deluged[1730]: Original exception was:
Apr 22 23:43:11 Home-Share deluged[1730]: Traceback (most recent call last):
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/bin/deluged", line 11, in <module>
Apr 22 23:43:11 Home-Share deluged[1730]:     load_entry_point('deluge==2.1.1', 'gui_scripts', 'deluged')()
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 81, in start_daemon
Apr 22 23:43:11 Home-Share deluged[1730]:     parser = ArgParserBase()
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 178, in __init__
Apr 22 23:43:11 Home-Share deluged[1730]:     version='%(prog)s ' + _get_version_detail(),
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 89, in _get_version_detail
Apr 22 23:43:11 Home-Share deluged[1730]:     from deluge._libtorrent import LT_VERSION
Apr 22 23:43:11 Home-Share deluged[1730]:   File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 30, in <module>
Apr 22 23:43:11 Home-Share deluged[1730]:     LT_VERSION = lt.__version__
Apr 22 23:43:11 Home-Share deluged[1730]: AttributeError: module 'libtorrent' has no attribute '__version__'
Apr 22 23:43:11 Home-Share systemd[1]: deluged.service: Main process exited, code=exited, status=1/FAILURE
Apr 22 23:43:11 Home-Share systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 22 23:43:11 Home-Share systemd[1]: deluged.service: Service hold-off time over, scheduling restart.
Apr 22 23:43:11 Home-Share systemd[1]: deluged.service: Scheduled restart job, restart counter is at 4.
Apr 22 23:43:11 Home-Share systemd[1]: Stopped Deluge Bittorrent Client Daemon.
Apr 22 23:43:11 Home-Share systemd[1]: Started Deluge Bittorrent Client Daemon.
Apr 22 23:43:12 Home-Share deluged[1736]: Traceback (most recent call last):
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/bin/deluged", line 11, in <module>
Apr 22 23:43:12 Home-Share deluged[1736]:     load_entry_point('deluge==2.1.1', 'gui_scripts', 'deluged')()
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 81, in start_daemon
Apr 22 23:43:12 Home-Share deluged[1736]:     parser = ArgParserBase()
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 178, in __init__
Apr 22 23:43:12 Home-Share deluged[1736]:     version='%(prog)s ' + _get_version_detail(),
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 89, in _get_version_detail
Apr 22 23:43:12 Home-Share deluged[1736]:     from deluge._libtorrent import LT_VERSION
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 30, in <module>
Apr 22 23:43:12 Home-Share deluged[1736]:     LT_VERSION = lt.__version__
Apr 22 23:43:12 Home-Share deluged[1736]: AttributeError: module 'libtorrent' has no attribute '__version__'
Apr 22 23:43:12 Home-Share deluged[1736]: Error in sys.excepthook:
Apr 22 23:43:12 Home-Share deluged[1736]: Traceback (most recent call last):
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 154, in apport_excepthook
Apr 22 23:43:12 Home-Share deluged[1736]:     os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
Apr 22 23:43:12 Home-Share deluged[1736]: FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_deluged.1000.crash'
Apr 22 23:43:12 Home-Share deluged[1736]: Original exception was:
Apr 22 23:43:12 Home-Share deluged[1736]: Traceback (most recent call last):
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/bin/deluged", line 11, in <module>
Apr 22 23:43:12 Home-Share deluged[1736]:     load_entry_point('deluge==2.1.1', 'gui_scripts', 'deluged')()
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/core/daemon_entry.py", line 81, in start_daemon
Apr 22 23:43:12 Home-Share deluged[1736]:     parser = ArgParserBase()
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 178, in __init__
Apr 22 23:43:12 Home-Share deluged[1736]:     version='%(prog)s ' + _get_version_detail(),
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/argparserbase.py", line 89, in _get_version_detail
Apr 22 23:43:12 Home-Share deluged[1736]:     from deluge._libtorrent import LT_VERSION
Apr 22 23:43:12 Home-Share deluged[1736]:   File "/usr/lib/python3/dist-packages/deluge/_libtorrent.py", line 30, in <module>
Apr 22 23:43:12 Home-Share deluged[1736]:     LT_VERSION = lt.__version__
Apr 22 23:43:12 Home-Share deluged[1736]: AttributeError: module 'libtorrent' has no attribute '__version__'
Apr 22 23:43:12 Home-Share systemd[1]: deluged.service: Main process exited, code=exited, status=1/FAILURE
Apr 22 23:43:12 Home-Share systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 22 23:43:12 Home-Share systemd[1]: deluged.service: Service hold-off time over, scheduling restart.
Apr 22 23:43:12 Home-Share systemd[1]: deluged.service: Scheduled restart job, restart counter is at 5.
Apr 22 23:43:12 Home-Share systemd[1]: Stopped Deluge Bittorrent Client Daemon.
Apr 22 23:43:12 Home-Share systemd[1]: deluged.service: Start request repeated too quickly.
Apr 22 23:43:12 Home-Share systemd[1]: deluged.service: Failed with result 'exit-code'.
Apr 22 23:43:12 Home-Share systemd[1]: Failed to start Deluge Bittorrent Client Daemon.
I believe the issue stems from a breaking change in 2.1.0, specifically 'libtorrent minimum requirement increased (>= 1.2)'. I) was on Deluge version 2.x previously. Not entirely sure which one however. I'm not quite understanding what to do to fix this as everything is fully up to date. If anyone has some direction I would be grateful.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluged service will not start

Post by mhertz »

What version of libtorrent, e.g 'deluged -V'.

Since you use deluge 2.1.1, then sounds like you're using a PPA or something, which includes newer libtorrent 1.2.x. That error also isn't seemingly related to using libtorrent 1.1.x.

There where an error reported regarding libtorrent 1.2.x on ubuntu 18.04, which I reproduced and posted various workarounds, though best workaround later came from yufaazhi here: viewtopic.php?p=235002#p235002 (Bottom part, so cd into dir and make a symbolic link from original name to libtorrent.so, e.g I posted relevant line in another thread with same subject, though just changed link to be in /usr/local instead, as more appropriate imho, but can be changed back fine also:

Code: Select all

sudo ln -s /usr/lib/python3/dist-packages/libtorrent.cpython-36dm-x86_64-linux-gnu.so /usr/local/lib/python3.6/dist-packages/libtorrent.so

Note, change/remove the x86_64 part of filename, if on 32 bit.

Granted the error from that ubuntu 18.04 issue was different, but just sounds related still somewhat, as libtorrent 1.1.x surely has a __version __ attribute also.

If not using the PPA, then imho consider to(for newer libtorrent 1.2.x) , and if needed, above fix afterwards.

https://launchpad.net/~deluge-team/+arc ... ntu/stable

Also, pypi is a possibility, through e.g 'sudo pip install libtorrent==1.2.*'.
.
jesman1
New User
New User
Posts: 2
Joined: Sun Apr 23, 2023 3:33 am

Re: Deluged service will not start

Post by jesman1 »

I think I may have gotten to a solution. Clearly the culprit was a bad libtorrent so I went about updating it. It updated to version 1.2.4.0 and Deluged was able to start since Libtorrent now had a version number however I was getting errors for all HTTPS trackers. Finding that this was likely due to an incorrect version of Libtorrent I went about basically purging everything relating to Deluge and Libtorrent and starting from scratch. Upon installing Deluge and Deluged once more I was greeted with a successful startup of the daemon.

I may have been able to get away with a less broad approach however I don't notice any lasting consequences of this. It's refreshing to know that things are now clean and working from a fresh install.

Thanks so much for the direction!
User avatar
ambipro
Moderator
Moderator
Posts: 443
Joined: Thu May 19, 2022 3:33 am
Contact:

Re: Deluged service will not start

Post by ambipro »

The https tracker error may be due to validation of certificates, you can download the ltConfig plugin viewtopic.php?f=9&t=42887&start=210 and after enabling it, scroll to the bottom of the list and select validate_https_trackers checkbox on the left to enable options and make sure it is unchecked on the right checkbox.

You'll want to apply at startup as well.

Common issue.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluged service will not start

Post by mhertz »

I'm glad to hear, and you're welcome :) Btw, I mentioned ubuntu 18.04 before, because looked up that mint 19.3 is based upon that, which I forgot to mention. Anyway, if was using libtorrent 1.1.x originally, then the error would state so(not fullfiling requirement of libtorrent==1.2>), and the attribute still available as said, so indeed something must've been wrong with that => 1.2.x install, but as said glad you fixed it, and thanks for reporting back.

Just in addition to ambipro's helpfull advice above, then libtorrent from some places, e.g. pypi, needs a env-var added to even support https trackers at all:

Code: Select all

export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
...But if just one specific one failing, or alike, then nice trick ambipro posted above.
Post Reply