Page 1 of 1

[solved] deluge-web.service: Deactivated successfully

Posted: Sun May 05, 2024 10:26 am
by fred44nl
Before, my Debian server was running on Debian 10 - Buster.
So, about time to update to Debian 11 - Bullseye and than further to Debian 12 - Bookworm.
Everything running fine, except Deluge.
I removed, purged and re-installed deluged and deluge-web.
That did not help at all.
The version of deluged and deluge-web is 2.0.3-4

I can succelfully start deluged:

Code: Select all

sudo systemctl status deluged
● deluged.service - Deluge Bittorrent Client Daemon
     Loaded: loaded (/etc/systemd/system/deluged.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-05-04 22:26:27 CEST; 13h ago
       Docs: man:deluged
   Main PID: 21312 (deluged)
      Tasks: 5 (limit: 4431)
     Memory: 52.0M
        CPU: 3min 57.906s
     CGroup: /system.slice/deluged.service
             └─21312 /usr/bin/python3 /usr/bin/deluged -d

mei 04 22:26:27 Debian systemd[1]: Started deluged.service - Deluge Bittorrent Client Daemon.
But deluge-web will not run and is de-activated:

Code: Select all

sudo systemctl status deluge-web
○ deluge-web.service - Deluge Bittorrent Client Web Interface
     Loaded: loaded (/etc/systemd/system/deluge-web.service; enabled; preset: enabled)
     Active: inactive (dead) since Sat 2024-05-04 22:26:48 CEST; 13h ago
   Duration: 697ms
       Docs: man:deluge-web
    Process: 21340 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
    Process: 21341 ExecStart=/usr/bin/deluge-web (code=exited, status=0/SUCCESS)
   Main PID: 21341 (code=exited, status=0/SUCCESS)
        CPU: 683ms

mei 04 22:26:42 Debian systemd[1]: Starting deluge-web.service - Deluge Bittorrent Client Web Interface...
mei 04 22:26:47 Debian systemd[1]: Started deluge-web.service - Deluge Bittorrent Client Web Interface.
mei 04 22:26:48 Debian deluge-web[21341]: Unable to initialize gettext/locale!
mei 04 22:26:48 Debian deluge-web[21341]: module 'gettext' has no attribute 'bind_textdomain_codeset'
mei 04 22:26:48 Debian deluge-web[21341]: Traceback (most recent call last):
mei 04 22:26:48 Debian deluge-web[21341]:   File "/usr/lib/python3/dist-packages/deluge/i18n/util.py", line 111, in setup_translation
mei 04 22:26:48 Debian deluge-web[21341]:     gettext.bind_textdomain_codeset(I18N_DOMAIN, 'UTF-8')
mei 04 22:26:48 Debian deluge-web[21341]:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mei 04 22:26:48 Debian deluge-web[21341]: AttributeError: module 'gettext' has no attribute 'bind_textdomain_codeset'
mei 04 22:26:48 Debian systemd[1]: deluge-web.service: Deactivated successfully.
As others did have problems with gettext/locale, I did comment out the lines 111 and 142 in /usr/lib/python3/dist-packages/deluge/i18n/util.py

Than I get this:

Code: Select all

sudo systemctl status deluge-web
○ deluge-web.service - Deluge Bittorrent Client Web Interface
     Loaded: loaded (/etc/systemd/system/deluge-web.service; enabled; preset: enabled)
     Active: inactive (dead) since Sun 2024-05-05 12:10:11 CEST; 23s ago
   Duration: 672ms
       Docs: man:deluge-web
    Process: 24388 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
    Process: 24389 ExecStart=/usr/bin/deluge-web (code=exited, status=0/SUCCESS)
   Main PID: 24389 (code=exited, status=0/SUCCESS)
        CPU: 665ms

mei 05 12:10:06 Debian systemd[1]: Starting deluge-web.service - Deluge Bittorrent Client Web Interface...
mei 05 12:10:11 Debian systemd[1]: Started deluge-web.service - Deluge Bittorrent Client Web Interface.
mei 05 12:10:11 Debian systemd[1]: deluge-web.service: Deactivated successfully.
No complaints about gettext anymore, but deluge-web is still deactivated.

What can I do next, to get deluge-web running again ??

Re: deluge-web.service: Deactivated successfully

Posted: Sun May 05, 2024 3:50 pm
by ambipro
https://man.archlinux.org/man/deluged.1.en

You can use these parameters to turn on logging and get, potentially, useful logs. systemd isn't really going to tell you whats wrong as detailed as something like DEBUG logs on the web process would be, although you could check the journal too....think that would be default info logs which may or may not be useful.

Also 2.0.3 is years old at this point...and a whole minor version bump behind (2.1.1 now)

Re: deluge-web.service: Deactivated successfully

Posted: Sun May 05, 2024 4:07 pm
by fred44nl
ambipro wrote: Sun May 05, 2024 3:50 pm Also 2.0.3 is years old at this point...and a whole minor version bump behind (2.1.1 now)
thank you for your reacttion.
but my Debian does not show or find anything else than version 2.0.3

Code: Select all

fred44nl@Debian:~$ sudo apt list --all-versions | grep deluge

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

deluge-common/stable,now 2.0.3-4 all [geïnstalleerd,automatisch]
deluge-console/stable 2.0.3-4 all
deluge-gtk/stable 2.0.3-4 all
deluge-web/stable,now 2.0.3-4 all [geïnstalleerd]
deluge/stable 2.0.3-4 all
deluged/stable,now 2.0.3-4 all [geïnstalleerd]
fred44nl@Debian:~$ 

Code: Select all

fred44nl@Debian:~$ sudo apt-cache policy deluged
deluged:
  Geïnstalleerd: 2.0.3-4
  Kandidaat:     2.0.3-4
  Versietabel:
 *** 2.0.3-4 500
        500 http://ftp.nl.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status
fred44nl@Debian:~$ 
how can I find and install version 2.1.1 ??
do I have to go to backports for this ??

Re: deluge-web.service: Deactivated successfully

Posted: Sun May 05, 2024 5:26 pm
by ambipro
There is a PPA and pypi (using pip to install) also has the latest version available on stable.

https://dev.deluge-torrent.org/wiki/Ins ... Repository

Re: deluge-web.service: Deactivated successfully

Posted: Sun May 05, 2024 6:31 pm
by mhertz
I'd follow the good ambipro's advice above, but anyway, you miss a '-d' switch for deluge-web(unless using type=forking I would guess, but not normally the recommended way for this though). And yes, this behavior changed(forking off main process), though years ago.

Re: deluge-web.service: Deactivated successfully

Posted: Sun May 05, 2024 7:28 pm
by fred44nl
thank you for the replies.
I am a bit confused now, because even on a new and fresh installation,
the -d parameter is missing in the file /etc/systemd/system/deluge-web.service.
if this is a know solution for the problem, I would expect that this would be in the installation package by default

anyway, I did add -d and I am fine.

Re: [solved] deluge-web.service: Deactivated successfully

Posted: Mon May 06, 2024 5:15 pm
by mhertz
Welcome :)

The systemd service-files aren't included in the debian package. They are in the deluge source-tree(with a '-d' for deluge-web also) but aren't installed by default, and so up to the package maintainers if including them in there packages additionally, which debian/ubuntu doesn't, hence e.g. these docs exist: https://deluge.readthedocs.io/en/latest ... rvice.html