Cannot start daemon with Ubuntu 20.04 - Now ltconfig

General support for problems installing or using Deluge
jpsdr
Member
Member
Posts: 32
Joined: Sat Oct 10, 2015 2:03 pm

Cannot start daemon with Ubuntu 20.04 - Now ltconfig

Post by jpsdr »

Hello.
I'm not used to linux, so things are hard for me.

I have an OVH server, yesterday it offers me to update from 18.04 to 20.04.
18.04 was with 1.3.15, now i'm have 2.0.3 with 20.04.

Daemond was not starting, i made research, i've tried the following :
/usr/lib/python3/dist-packages/deluge/i18n/util.py
replace :
gettext.install(I18N_DOMAIN, translations_path, names='ngettext', **kwargs)
with :
gettext.install(I18N_DOMAIN, translations_path, names=['ngettext'], **kwargs)

apt install python3-pip
pip3 install --upgrade twisted

/usr/lib/python3/dist-packages/deluge/log.py
replace :
def findCaller(self, stack_info=False): # NOQA: N802
with :
def findCaller(self, *args, **kwargs): # NOQA: N802

delete old keys :
/val/lib/deluged/.config/deluge/ssl
(daemon.cert daemon.pkey)

add '-d' to deluge-web service option.
in deluged.service put :
ExecStart=/usr/bin/deluged -d -l /var/log/deluged/daemon.log -L debug
But there is no log file created.

The result of 'journalctl -u deluged.service' is :
32:09 ns303642.ip-94-23-207.eu systemd[1]: Stopping Deluge Bittorrent Client Daemon...
oct. 10 17:32:11 ns303642.ip-94-23-207.eu systemd[1]: deluged.service: Succeeded.
oct. 10 17:32:11 ns303642.ip-94-23-207.eu systemd[1]: Stopped Deluge Bittorrent Client Daemon.
oct. 10 17:32:11 ns303642.ip-94-23-207.eu systemd[1]: Started Deluge Bittorrent Client Daemon.
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: Unhandled error in Deferred:
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: Temporarily disabling observer LegacyLogObserverWrapper(<bound meth>
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critic>
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: --- <exception caught here> ---
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__ca>
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/deluge/log.py:208:emit
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publis>
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call>
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3.8/logging/__init__.py:1500:log
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: /usr/lib/python3.8/logging/__init__.py:1565:_log
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: ]
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: Traceback (most recent call last):
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", >
oct. 10 17:32:13 ns303642.ip-94-23-207.eu deluged[23432]: log.critical("Unhandled error in Deferred:",

I don't know what to do... :cry:
Last edited by jpsdr on Tue Oct 13, 2020 6:57 am, edited 1 time in total.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Cannot start daemon with Ubuntu 20.04

Post by mhertz »

I don't know why still shows logging errors with your fixes applied, though still one other logging fix in deluge-develop, but I'm not sure is related and still should only be cosmetic and no showstopper.

Just to be sure, then could you try eliminate systemd from equation and just try run "deluged" and se with htop or top command that it still runs and haven't crashed? You can also try running afterwards "deluge-web", and then checking from webbrowser on address localhost:8112 to see if deluge-webui comes up or not. If works, then kill them again with "pkill deluged" and "pkill deluge-web".

In my quick tests of ubuntu 20.04, I needed a few systemd commands to get working, as there was issues with the compatibility-layer between systemd and old sysV, but deluged did work standalone regardless, hence why I first ask you to check that.
jpsdr
Member
Member
Posts: 32
Joined: Sat Oct 10, 2015 2:03 pm

Re: Cannot start daemon with Ubuntu 20.04

Post by jpsdr »

Not sure what i had to do, but it seems that starting in a console with command line worked. I needed two consoles, because on the first, after starting deluged it didn't go back to prompt, but in second one, starting deluge-web go back to prompt. Web-ui seems to work, but cannot totaly connect as it rejected the password i usualy used.
ps -A gives me the two process working and not ending after even less than a few second.
But, even when "working", still unable to connect to daemon on the server from my PC at home as i usualy do (on my PC at home as it's Windows it version 1.3.15).
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Cannot start daemon with Ubuntu 20.04

Post by mhertz »

Yeah, it was only a quick test to see if you where having the systemd/sysv-compatibility issue I also encountered, or an actual deluge issue itself.

Note, you can never connect with your deluge 1.x GTK-UI on your windows PC, though if wanted you can try petersasi's unofficial deluge 2.0,x installers posted in the windows section of this forum, or instead resort to using the webui only.

Anyway, I atleast got deluge working on ubuntu 20.04 by doing what I posted here in this post of mine - you only need to read the "sumerized instructions" part of the edit at bottom - I also fixed the down wget links to service files just in case. Note, if deluged and/or deluge-web still is running, then kill them first before doing my instructions.

viewtopic.php?f=7&t=55673&p=232328#p232328
jpsdr
Member
Member
Posts: 32
Joined: Sat Oct 10, 2015 2:03 pm

Re: Cannot start daemon with Ubuntu 20.04

Post by jpsdr »

Done the disable/enable
From the journalctl, it says that ssl routines, eekey too small.

EDIT
Hum.... After deleting the old keys i probably need to re-created them... :D

EDIT 2
Re-created the keys in
/val/lib/deluged/.config/deluge/ssl
with :
openssl req -new -x509 -nodes -out deluge.cert.pem -keyout deluge.key.pem
but still the ssl key too small error...

Code: Select all

18:57:54 [ERROR   ][deluge.core.daemon_entry      :132 ] Unable to start deluged: [('SSL routines', 'SSL_CTX_use_certificate', 'ee key too small')]
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Cannot start daemon with Ubuntu 20.04

Post by mhertz »

Sorry, I have no experience with SSL whatsoever. A quick googling of the error shows some getting by with deleting folder/recreating the keys like you did, but one stated he had to change his local TLS version settings, as his distro had changed default settings for that, and which I see ubuntu 20.04 also did, so maybe try mess with that. Otherwise others may chime in as I'm out of my depth here honestly.

viewtopic.php?t=55646
jpsdr
Member
Member
Posts: 32
Joined: Sat Oct 10, 2015 2:03 pm

Re: Cannot start daemon with Ubuntu 20.04

Post by jpsdr »

Thanks for the help provided.

For now, i still have the error... Tried to add MinProtocol = TLSv1.1, didn't change.
I don't know where it tries to get the keys, i've identify the following directories having ssl keys :
/val/lib/deluged/.config/deluge/ssl
/val/lib/debian-deluged/.config/deluge/ssl
/val/lib/deluge/config/ssl
~/.config/deluge/ssl (here it's 'root').
Recreate all of them, for now without success...
Command used : openssl req -new -x509 -days 3650 -nodes -out daemon.cert -keyout daemon.pkey

If anyone has any clues...
jpsdr
Member
Member
Posts: 32
Joined: Sat Oct 10, 2015 2:03 pm

Re: Cannot start daemon with Ubuntu 20.04

Post by jpsdr »

I've finaly found where was the bad key !!!
So i've uninstalled on my PC the 1.3.15 because it can't connect to daemon, get the unoficial 3.0 windows build and...... it needs a 64 bits OS and i'm under a 32 bit OS :cry:
jpsdr
Member
Member
Posts: 32
Joined: Sat Oct 10, 2015 2:03 pm

Re: Cannot start daemon with Ubuntu 20.04 - Now ltconfig

Post by jpsdr »

I'm trying to install ltconig, i got the ltConfig-2.0.0.egg file from the repo. In the webUI, i choose under plugin "Install", a popup with "plugin egg : select an egg" appears, i select the ltConfig-2.0.0.egg file, and "select egg" change to "[object file list]". Clicking install does nothing...?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Cannot start daemon with Ubuntu 20.04 - Now ltconfig

Post by mhertz »

The ltconfig issue happens with certain plugins when trying install them through the WEB-UI, so instead you will need to manually do it i.e copy the plugin egg to plugins subfolder in deluge config folder(and restart deluge/daemons).
Post Reply