Deluge Console Broken after 6.20 update

Hi,



I notice after the latest update to 6.20. even on a fresh image install that deluge console no longer works. Deluge Web works fine and all services seem to be fine. However logging in as root and running deluge-console yields the following result.



root@DietPi:# deluge-console

Failed to connect to 127.0.0.1:58846 with reason: Username does not exist


i was able to fix the issue by copying the auth file from /mnt/dietpi_userdata/deluge/.config/deluge/auth to ~/.config/deluge and restarting the daemon

Not sure if this is a bug or by design

From which DietPi version did you update to v6.20?

At least on v6.20 we did a deluge reinstall. That should imply setting the deluge users HOME to /mnt/dietpi_userdata/deluge, so you should not need to move the file :thinking:.

Did you actually move it to /home/deluge/.config/deluge… or indeed ~/.config/… which would be the home dir of the user that you currently logged in, which should be not correct :thinking:.

I will try to replicate later.

upgraded from 6.19 on RPI-3 platform. Just confirmed i moved auth to ~/.config/deluge/auth or /root/.config/deluge/auth while i was logged in as root.

What i noticed also is that yes deluge configuration files are in /mnt/dietpi_userdata/deluge including the auth file, but for some reason it wont allow deluge-console login until the auth file is copied to ~/.config/deluge

I moved this issue to GitHub: https://github.com/Fourdee/DietPi/issues/2556

seanmikhaels
Sorry for the long delay. I checked and jep it totally makes sense. We override the users home to dietpi_userdata within the deluge daemon and web UI systemd units, but outside of that the users home is inside default /home.

The since the deluge-console command runs outside of the systemd units, it uses the default home dir. So we need to adjust this, try:

systemctl stop deluge-web
systemctl stop deluged
usermod -d /mnt/dietpi_userdata/deluge deluge
rm -R /home/deluge
systemctl start deluged
systemctl start deluge-web
sudo -u deluge deluge-console

Note that deluge needs to be started as deluge user.

EDIT
Wait, I checked the default Debian package install. Hmm not sure what the intention of deluge-console is, if you run the daemon. The Debian defaults deluge init.d daemon by default runs as debian-deluged user with an own config dir in /var/lib/deluged. When executing deluge-console just as is, it runs as current login user and creates an own config dir in users home. So the configuration of the console and the daemon + web UI does not match. Do the configured download directory and all this then actually match or are there then two totally different “instances” run? Not sure about the use cases, found https://forum.deluge-torrent.org/viewtopic.php?t=28265 and this somehow matches my thoughts that the console indeed should be executed with the daemons user.
seanmikhaels
Can you verify that all this makes sense?

I plan to rewrite the installer to use the user that is pre-generated with the Debian package (to not have two users which might be confusing), but move the config and home dirs to dietpi_userdata for easier transition, permissions handling and such.
And add info to our docs at https://dietpi.com/forum/t/dietpi-software-details-for-all-installation-options/22/16 that deluge-console needs to be run as the deluge user then (via sudo).

Other sources that match the thoughts:

Also the official Deluge docs state the sudo thing: