Deluge Console Broken after 6.20 update

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
seanmikhaels
Posts: 5
Joined: Thu Jan 03, 2019 1:56 pm

Deluge Console Broken after 6.20 update

Post by seanmikhaels » Thu Feb 07, 2019 8:11 pm

<r>Hi, <br/>
<br/>
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.



[email protected]:# 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

User avatar
MichaIng
Site Admin
Posts: 1728
Joined: Sat Nov 18, 2017 5:21 pm

Re: Deluge Console Broken after 6.20 update

Post by MichaIng » Fri Feb 08, 2019 3:53 pm

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 :?.

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 :?.

I will try to replicate later.

seanmikhaels
Posts: 5
Joined: Thu Jan 03, 2019 1:56 pm

Re: Deluge Console Broken after 6.20 update

Post by seanmikhaels » Tue Feb 12, 2019 2:04 pm

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

User avatar
MichaIng
Site Admin
Posts: 1728
Joined: Sat Nov 18, 2017 5:21 pm

Re: Deluge Console Broken after 6.20 update

Post by MichaIng » Sat Feb 16, 2019 5:32 pm

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

User avatar
MichaIng
Site Admin
Posts: 1728
Joined: Sat Nov 18, 2017 5:21 pm

Re: Deluge Console Broken after 6.20 update

Post by MichaIng » Tue Feb 26, 2019 3:48 pm

@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:

Code: Select all

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 viewtopic.php?p=61#p61 that deluge-console needs to be run as the deluge user then (via sudo).

Other sources that match the thoughts:
- https://superuser.com/questions/619261/ ... connection
- https://forum.deluge-torrent.org/viewtopic.php?t=43241

Also the official Deluge docs state the sudo thing:
- https://dev.deluge-torrent.org/wiki/Use ... ThinClient

Post Reply