Deluge keeps giving problems no matter how hard I try

General support for problems installing or using Deluge
Cas_vt
Member
Member
Posts: 17
Joined: Fri Mar 12, 2021 2:51 pm

Re: Deluge keeps giving problems no matter how hard I try

Post by Cas_vt »

Okay I've read this quite a few times now and I think I understand it... (hopefully). To make sure:
[1] I need to check if hostlist.conf and auth have only one host in them. I checked that and it has indeed only one host in both files! Great
[2] I need to copy the contents (only the contents to avoid permissions, I just replace the content of the file with the new copied content) of hostlist.conf and auth (/var/lib/blah) to hostlist.conf and auth (~/blah).
[3] stop and start deluged and deluge-web for good practise. Just because I can. And to make sure I didn't accidently corrupt the files while copying the contents.
[4] And now what ashmandias said. But I don't understand what he means.

After this is all done, should I remove test:test:10? How much of the auth file can I remove after and/or do I need to copy?

I'm just trying to understand it correctly before I'm messing it up. And as it is indeed a bit confusing, I want to make sure.
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge keeps giving problems no matter how hard I try

Post by mhertz »

Sorry for my test:test useless additions again firstly. Second, you're pretty much on point, except always stop deluged and deluge-web, I.e nothing deluge running(GTKUI neither etc), before editing config files as often gets lost without. Edit, and then start and test it works. You only have to start/stop if needing a new fresh config file to work with e.g because messed up, so you stop, delete conf wanted fresh and start, and stop again, and new conf made. Anyway, it's just simpler to remove everything other than localclient from auth's and hostlist.conf's, and if having more in hostlist.conf then are listed as options on every connection manager dialog in every client, without use, just why I stated it, if not used anyway, but no strict rule that you cannot have this though, so up to you. The only thing you need is a localclient line on the auth's and a localclient section in the hostlist.conf's, btw, sometimes if need fresh hostlist.conf to start over, then isn't generated on daemons start/stop, and need e.g run deluge-console a single time and then quit with shift+q, and it's there now. Yes test:test:10 is useless if not needing second user, sorry - as said, I only found out yesterday you could login to deluge-console daemon with localclient from other user if having same sections in the two auth's and hostlist.confs. You probably don't need localclient(deluge writes new line if missing) and could use e.g test:test:10 in all configs, but just makes sence to use the already default provided imho if not having other wishes. I need to test some more and read more up on it honestly, and if wanting better and more correct adwise, then ask others more in the know than me, e.g ashmandias. He correctly stated that you need auth's files in both locations and not just one, like I also came to same conclusion in my previous posts edit.

Edit: Not at my computer now, but I'm not even sure you need hostlist.conf,and just seem to remember it was needed for deluge-console running standalone, but I could very well be wrong, sorry again. Atleast doesn't hurt nonetheless. Years ago I only stated to people they needed matching auth's in both locations, and that also worked for me I'm pretty sure on deluge 1 consoleui, once where I used systemd services shortly and deluge user, so if wanted then try without, up to you, as I cannot test myself now.
Cas_vt
Member
Member
Posts: 17
Joined: Fri Mar 12, 2021 2:51 pm

Re: Deluge keeps giving problems no matter how hard I try

Post by Cas_vt »

Okay. So it worked.. almost. I copied the contents of the auth and hostlist.conf to the auth and hostlist.conf files inside ~/... . And it works. I can do "deluge-console cache" and it gives an output. I can do "deluge-console add blalblabl" and it adds the torrent. But there's one thing that isn't working yet. And that is doing the following:

Code: Select all

deluge-console rm -c xxxxxxx
In the place of xxx is the string that you see that is unique for every torrent that you see in the info output. This worked perfectly (before the moving ofcourse) doing:

Code: Select all

deluge-console -U test -P test rm -c xxx
But now that I've copied everything and stuff, so that I can run it without -U.. -P..., it says password does not match. Only with rm -c. The rest works perfectly! What do you think it is? Inside the auth file (~/), the localclient is ":10", yet I can't remove torrent...
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge keeps giving problems no matter how hard I try

Post by mhertz »

Indeed, I was actually thinking to mention that specifically previously, but forgot completely, but you catched it :) It's not a config issue, but actually a deluge bug which i've reported also on bugtracker already. There is a fix for it in an unmerged PR by Lucas C on deluge's github, but you don't need that fix - let me explain.

The '-c' short-version of '--confirm' is an oversigth by devs, because '-c' already is used as reserved keyword for defining alternate config-dir location, so when deluge see's '-c' it thinks you stating that confgs now should be read from the path of whatever you added afterwards on the command-line, which isn't correct obviously, and so fails authenticate because now suddently doesn't have your auth file anymore(and/or hostlist.conf, not sure about it's role fully yet in this, if any, besides it's general usage of populating connection manager in clients with your configured hosts therein).

The fix by Lucas C, just removes the "double-reserved by mistake" '-c' keyword option of 'rm' and only leaves the '--confirm' long version, plus updates the '--help' output of 'rm' accordingly, so you don't need that fix and instead just need continue hence forward with '--confirm' instead of '-c'.

I had for a few years didn't understood the issue, and just thought that was a restricted command somehow needing specific login and not auto-connect working for some reason, so just did 'deluge-console "connect localhost; rm -c xxxxxx"', and also reported this, years ago as strange behaviour, but after learning this, by reading the PR by Lucas C, then now just use '--confirm'.

Note if you're used to deluge1, which supported entering something from beginning of torrent-name, which was awesome imho, then in deluge2 that is even more improved by now accepting both from beginning or end/middle, but now demands adding asterisks, so an archlinux iso, can now be deleted also with '*chlin*' just as example, though little bad, but ypu get me drift i'm sure.

Anyway, glad to hear you got it working :)
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge keeps giving problems no matter how hard I try

Post by mhertz »

Just wanted to add a little tidbit. For another time, then you actually only need to copy auth from daemon and into user's config, as ashmandias also stated previously. This will make e.g. 'deluge-console info' etc work, but however when running only 'deluge-console' so the ncrurses UI starts, then you cannot login to your daemon - it is listed, but you cannot login to it, which I think is a deluge2 bug, as in GTKUI you can just add new host with entered user/pass, but crashes in middle of trying that here, with twisted deferred errors plastering over screen.

This can be fixed by copying also hostlist.conf over from daemon to user. However, it's actually also possible, and easier, to just delete hostlists.conf from your user, and then works with both deluge-console command-line mode and also ncurses mode. It then gets generated correctly automatically.

So, in short, next time needing set this up, then if not having an auth in the daemon location i.e. deleted to start fresh or whatever, then start deluged and it gets generated, and then you don't even need stop it again, as can just copy over the auth from daemon to users dir and delete hostlist.conf if having such in your user dir, and then can run deluge-console in both modes fine now. If wanting also copy hostlist.conf over, instead of deleting, then gets generated in daemon location if not existing already, when starting deluge-web, so if wanting this, then make sure start both daemons and not only deluged.

So something along lines off:

Code: Select all

sudo systemctl start deluged deluge-web
sudo cp /var/lib/deluged/.config/deluge/auth ~/.config/deluge
sudo chown cas: ~/.config/deluge/auth
rm ~/.config/deluge/hostlist.conf
Or same achieved with:

Code: Select all

sudo systemctl start deluged deluge-web
sudo cp /var/lib/deluged/.config/deluge/{auth,hostlist.conf} ~/.config/deluge
sudo chown cas: ~/.config/deluge/{auth,hostlist.conf}
For the chown lines, when not adding anything after the colon, then default primary group for user is used, e.g on my end then 'martin:' is short for 'martin:users'.

Remember needing stop daemons first if manually editing configs in daemon's dir and start them afterwards, but not the case here specifically.

Oh, then also needs the id of hostlist.conf of daemon added into web.conf of daemon as default_daemon, like you previously did.
Cas_vt
Member
Member
Posts: 17
Joined: Fri Mar 12, 2021 2:51 pm

Re: Deluge keeps giving problems no matter how hard I try

Post by Cas_vt »

changing "-c" to "--confirm" worked. So it's done. Everything works and I'm very happy with it! I just want to thank you for the probably few 1000 words written by you to help me. I truly appreciate that! So I just wanted to thank you. That's all
mhertz
Moderator
Moderator
Posts: 2182
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Deluge keeps giving problems no matter how hard I try

Post by mhertz »

Short and consice/to-the-point has unfortunetly never been my forte, seemingly/apparently lol, but anyways, i'm gad to hear it's working, and I learned something along the way to, so thank you yourself, and I appreciate your kind words, thanks mate! :)
Post Reply