Page 1 of 1

Deluge-web on Ubuntu Server 20.04

Posted: Sun Aug 15, 2021 1:54 am
by nothreat33
I am unable to figure out why I am unable to download torrents using the web interface. I am using a proxy SOCK5/AUTH that works on my desktop. This is also the set up for deluge-web on the ubuntu server, however the torrents never start. The only error I see on screen is in the torrent details. Under "Tracker Status" it says "Error: Invalid Argument".

I'm not able to find a lot of information on this error. Any help appreciated thank you.

deluge-web 2.0.3
libtorrent: 1.1.13.0
Python: 3.8.10
OS: Linux Ubuntu 20.04 focal

Re: Deluge-web on Ubuntu Server 20.04

Posted: Sun Aug 15, 2021 7:55 am
by mhertz
There's an open ticket about this here: https://dev.deluge-torrent.org/ticket/3294

Summerizing from above, then for some reason deluge reports port 0 as incoming port to trackers, for some, after upgrading to deluge2. One could fix it by changing port to random and some others reported success with changing port to something else, apply, reverted back again to original value, apply, reboot, though one had to repeatedly do that upon rebooting. Also, a more viable solution seemingly was upgrading to libtorrent 1.2.x, e.g from this PPA: https://launchpad.net/~libtorrent.org/+ ... /1.2-daily

Re: Deluge-web on Ubuntu Server 20.04

Posted: Sun Aug 15, 2021 11:51 am
by nothreat33
Thank you. Updating libtorrent resolved that error. Now I am getting Tracker Status: Error: Permission Denied.

deluged and deluge-web are both running as the deluge user. The download folder was /home/deluge, which resulted in that error still. I tried creating /home/deluge/Downloads but I still get the same error.

$ sudo ps -U deluge
PID TTY TIME CMD
1354 ? 00:00:02 deluged
1379 ? 00:00:02 deluge-web

$ id deluge
uid=116(deluge) gid=123(deluge) groups=123(deluge)

$ groups deluge
deluge : deluge

$ ls -lh
total 16K
drwxr-xr-x 3 deluge deluge 4.0K Aug 9 01:40 deluge

/home/deluge$ ls -lh
total 4.0K
drwxr-xr-x 2 deluge deluge 4.0K Aug 15 11:29 Downloads

A lot of restarting of both deluged, deluge-web and the whole system gives the same error. Not sure what's causing permission denied all permissions seem ok.

Re: Deluge-web on Ubuntu Server 20.04

Posted: Sun Aug 15, 2021 12:44 pm
by mhertz
Yeah permissions look okay(if execute bit on /home dir itself set, to traverse through, though believe usually is like that by default - can also test with e.g: 'sudo -u deluge touch /home/deluge/Downloads/test', to see if writable there, by deluge user, which it should be from your postings. Also, since the reported error is coming from the tracker specifically, then I don't think it's a file-permission issue. I quickly looked it up, and saw one report this on a reddit thread, using deluge and socks5 proxy - it worked on private torrents for him, but not a couple of public ones. He used windscribe socks5 proxy btw, and speculated the public trackers he tested, had banned some of windscribe's proxy IPs, as I also seen windscribe report this themselves a few years ago on there wiki/webpage. He restarted deluge many times and also changed log-level and then started working again reportedly.

If that is the issue, then need experiment and find an IP that works and use that hardcoded instead of an url in deluge proxy settings.

If not this then sorry no idea about what else to do - I only looked it up very shortly however, and maybe you will have better luck doing some deeper troubleshooting/research than what I did here.

Good luck.

Re: Deluge-web on Ubuntu Server 20.04

Posted: Mon Aug 16, 2021 3:33 am
by nothreat33
Thanks for the help. I don't think it's the SOCKS5 proxy. I have a ubuntu desktop too and tried the same proxy configuration on deluge there and it worked fine (same torrent). I'm wondering if the user/group deluge does not have the permissions to use the proxy on the ubuntu server. Do you know of a way to tell or set it so the deluge user has that ability?

Re: Deluge-web on Ubuntu Server 20.04

Posted: Mon Aug 16, 2021 12:04 pm
by mhertz
You can test that by running from a terminal e.g.:

Code: Select all

sudo -u deluge curl -x socks5h://<username>:<password>@<url>:<port> ifconfig.co
If curl not installed already, then 'sudo apt install curl'.'

This will verify your proxy connectivity from deluge user by displaying your proxied IP connected to at the time.

I doubt that's the issue honeslty, but have no other ideas as said unfortunetly.

Re: Deluge-web on Ubuntu Server 20.04

Posted: Mon Aug 16, 2021 2:57 pm
by nothreat33
Thanks i'll look into it more and post the solution if I solve it.

Re: Deluge-web on Ubuntu Server 20.04

Posted: Mon Aug 16, 2021 4:11 pm
by mhertz
A few comments more. Are you sure not mistyped user/pass, being permission denied error? Are you using same libtorrent version on the working and non-working setups.

If wanna troubleshoot this, then I know Arvid added some socks5 debug logging for troubleshooting failing proxies a couple years ago. To enable this output, then more extended libtorrent debug logging than deluge defines by default is needed, where easiest is use ltconfig plugin and change alert_mask to '-1' and restart with debug-logging enabled for deluged(not the webui) e.g 'sudo -u deluge deluged -L debug -l deluged.log'. It's very big log, so just grep through it for socks or proxy I'm thinking. If not wanna use ltconfig, then I can tell you how change the deluge code directly to get the extended debug logging enabled for libtorrent.