Deluge does not download anything

Hi all. I have an issue with Deluge.

I just reinstalled the last release from sratch because of a SD failure after a couple of years of continuous usage of the last one. The system was always kept up to date.

After the flash on the new SD I tried to replicate my previous setup. I have an external NTFS USB drive mounted at /mnt/storage where I used to save downloads. I mounted it with dietpi-drive_manager. I also installed the ntfs-3g driver and I’m able to create and delete files in the mounted drive.

dietpi@DietPi:~$ df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/root                    59G  4.7G   52G   9% /
devtmpfs                    350M     0  350M   0% /dev
tmpfs                       480M     0  480M   0% /dev/shm
tmpfs                       192M  9.8M  183M   6% /run
tmpfs                       5.0M  4.0K  5.0M   1% /run/lock
tmpfs                       1.0G   16M 1009M   2% /tmp
tmpfs                        50M   12K   50M   1% /var/log
/dev/mmcblk0p1              127M   32M   95M  26% /boot
/dev/sda1                   932G  464G  468G  50% /mnt/storage

dietpi@DietPi:~$ ll /mnt
total 268
drwxrwxr-x 16 dietpi dietpi   4096 Sep 10 14:30 dietpi_userdata
drwxrwxr-x  2 dietpi dietpi   4096 Jul  3 17:36 ftp_client
drwxrwxr-x  2 dietpi dietpi   4096 Jul  3 17:37 nfs_client
drwxrwxr-x 18 root   dietpi 262144 Sep 13 23:02 storage

I reinstalled Deluge from the software utility and pointed the download folder to /mnt/storage/Torrents/Downloading/

Everything seems similar to my old setup. The services are runnig as expected, the web ui works perfectly and the user permissions seem right.

dietpi@DietPi:~$ ps -ef | grep deluge
debian-+    1592       1  1 Sep13 ?        00:14:39 /usr/bin/python3 /usr/bin/deluged -d
debian-+    1605       1  0 Sep13 ?        00:01:25 deluge-web

dietpi@DietPi:~$ groups debian-deluged
debian-deluged : dietpi debian-deluged

All that said, every torrent I add to the download list via the web ui do not start. They just stay there at 0%

I see Peers and Peers constantly at 0.

BTW, I added a torrent that points to /mnt/storage/Torrents (USB drive) and one that points to /mnt/dietpi_userdata/deluge (system SD card) and neither of them starts, so I’m inclined to say that it’s NOT the destination drive type or FS that causes the issue

The logs don’t say much.

-- Journal begins at Wed 2022-09-14 22:10:31 CEST, ends at Thu 2022-09-15 15:02:30 CEST. --
Sep 14 22:11:09 DietPi systemd[1]: Started Deluge Daemon (DietPi).
Sep 14 22:11:10 DietPi systemd[1]: Started Deluge Web UI (DietPi).

I didn’t change any of the default ports. In deluge web-ui I have “incoming port” set to 6881, and I can’t see it in the list. “outgoing ports” is ser to random

dietpi@DietPi:/usr/lib/systemd/system$ ss -tlpn
State                Recv-Q               Send-Q                               Local Address:Port                                Peer Address:Port               Process                                                                    
LISTEN               0                    128                                        0.0.0.0:34947                                    0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:57381                                    0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:54085                                    0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:4711                                     0.0.0.0:*                   users:(("amuleweb",pid=587,fd=14))                                        
LISTEN               0                    5                                        127.0.0.1:6600                                     0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:4712                                     0.0.0.0:*                   users:(("amuleweb",pid=587,fd=8),("amuled",pid=573,fd=8))                 
LISTEN               0                    4096                                       0.0.0.0:9002                                     0.0.0.0:*                                                                                             
LISTEN               0                    80                                       127.0.0.1:3306                                     0.0.0.0:*                                                                                             
LISTEN               0                    511                                      127.0.0.1:6379                                     0.0.0.0:*                                                                                             
LISTEN               0                    50                                         0.0.0.0:139                                      0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:36845                                    0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:111                                      0.0.0.0:*                                                                                             
LISTEN               0                    50                                         0.0.0.0:8112                                     0.0.0.0:*                                                                                             
LISTEN               0                    511                                        0.0.0.0:80                                       0.0.0.0:*                                                                                             
LISTEN               0                    5                                          0.0.0.0:8181                                     0.0.0.0:*                                                                                             
LISTEN               0                    4096                                       0.0.0.0:4662                                     0.0.0.0:*                   users:(("amuleweb",pid=587,fd=10),("amuled",pid=573,fd=10))               
LISTEN               0                    1000                                       0.0.0.0:22                                       0.0.0.0:*                                                                                             
LISTEN               0                    511                                        0.0.0.0:443                                      0.0.0.0:*                                                                                             
LISTEN               0                    4096                                     127.0.0.1:8125                                     0.0.0.0:*                                                                                             
LISTEN               0                    64                                         0.0.0.0:39517                                    0.0.0.0:*                                                                                             
LISTEN               0                    50                                         0.0.0.0:445                                      0.0.0.0:*                                                                                             
LISTEN               0                    50                                         0.0.0.0:58846                                    0.0.0.0:*                                                                                             
LISTEN               0                    4096                                     127.0.0.1:19999                                    0.0.0.0:*                                                                                             
LISTEN               0                    64                                         0.0.0.0:2049                                     0.0.0.0:*                                                                                             
LISTEN               0                    4096                                          [::]:40611                                       [::]:*                                                                                             
LISTEN               0                    1024                                             *:5252                                           *:*                                                                                             
LISTEN               0                    5                                            [::1]:6600                                        [::]:*                                                                                             
LISTEN               0                    4096                                          [::]:9002                                        [::]:*                                                                                             
LISTEN               0                    511                                          [::1]:6379                                        [::]:*                                                                                             
LISTEN               0                    50                                            [::]:139                                         [::]:*                                                                                             
LISTEN               0                    64                                            [::]:42191                                       [::]:*                                                                                             
LISTEN               0                    4096                                          [::]:111                                         [::]:*                                                                                             
LISTEN               0                    511                                           [::]:80                                          [::]:*                                                                                             
LISTEN               0                    4096                                          [::]:55507                                       [::]:*                                                                                             
LISTEN               0                    4096                                             *:8084                                           *:*                                                                                             
LISTEN               0                    128                                              *:21                                             *:*                                                                                             
LISTEN               0                    50                                               *:2038                                           *:*                                                                                             
LISTEN               0                    1000                                          [::]:22                                          [::]:*                                                                                             
LISTEN               0                    50                                               *:2039                                           *:*                                                                                             
LISTEN               0                    4096                                          [::]:57049                                       [::]:*                                                                                             
LISTEN               0                    511                                           [::]:443                                         [::]:*                                                                                             
LISTEN               0                    50                                            [::]:445                                         [::]:*                                                                                             
LISTEN               0                    4096                                         [::1]:8125                                        [::]:*                                                                                             
LISTEN               0                    64                                            [::]:2049                                        [::]:*       

Can anyone please tell me what I am missing?

yes, you are missing the newest feature (bug) of Deluge application :wink:

I played with it and had the same issue to download stuff from a source (RPi image)

After playing around I found the trigger to get Deluge to LISTEN on port 6881. Within the preference menue, simple hit the arrow down/up button to change port from 6881 to 6882 and back to 6881. Apply the change and check ports again

ss -tulpn | grep deluged

You should see port being used now. Perform a “force recheck” in Deluge Web UI. At least this start the download on my test system.

2 Likes

make sure your permissions are correct for the Torrent drive, that was my problem

That was it!!!

I just had to change the port, and apply, then change it back, and apply, and after some seconds, the downloads started one by one by themselves.

Thank you very much!! You really saved my day.

P.S.

the

ss -tulpn | grep deluged

command does not show any port used by deluged anyway.

strange, for me this is working perfectly.

root@DietPiR5S:~# ss -tulpn | grep deluged
udp   UNCONN 0      0                0.0.0.0:6771       0.0.0.0:*    users:(("deluged",pid=2864,fd=20))
udp   UNCONN 0      0                0.0.0.0:6771       0.0.0.0:*    users:(("deluged",pid=2864,fd=19))
udp   UNCONN 0      0      192.168.0.20%eth0:6881       0.0.0.0:*    users:(("deluged",pid=2864,fd=15))
udp   UNCONN 0      0           127.0.0.1%lo:6881       0.0.0.0:*    users:(("deluged",pid=2864,fd=13))
udp   UNCONN 0      0           192.168.0.20:1900       0.0.0.0:*    users:(("deluged",pid=2864,fd=17))
udp   UNCONN 0      0           192.168.0.20:48144      0.0.0.0:*    users:(("deluged",pid=2864,fd=18))
udp   UNCONN 0      0           192.168.0.20:52572      0.0.0.0:*    users:(("deluged",pid=2864,fd=16))
tcp   LISTEN 0      50               0.0.0.0:58846      0.0.0.0:*    users:(("deluged",pid=2864,fd=32))
tcp   LISTEN 0      5      192.168.0.20%eth0:6881       0.0.0.0:*    users:(("deluged",pid=2864,fd=14))
tcp   LISTEN 0      5           127.0.0.1%lo:6881       0.0.0.0:*    users:(("deluged",pid=2864,fd=12))
root@DietPiR5S:~#

Is this something we can fix our end? I wonder what changed, since there was no Deluge package update since 2021. But probably we apply the listen ports incorrectly, which gets fixed by switching them in web UI back and forth?

Yesterday I was looking at this problem and I found a thread that says that connections aren’t working if your incoming port is NOT set to random in the network settings.
image

I guess yes. Looke like port configuration was not fitting. It should be

    "listen_ports": [
        6881,
        6881
    ],

instead of

    "listen_ports": [
        6881,
        6891
    ],

I tried to fix it using DietPi-Software | Deluge: Fix listening port on Bullseye by Joulinar · Pull Request #5872 · MichaIng/DietPi · GitHub

Isn’t it possible to set a range of ports? AFAIK this was intended, also the reason there are two entries, start and end of the port range.

The UI don’t offer such a range. There you have a single port you can define.

Might be a limitation of the UI itself, as it is a dedicated program and daemon. It works very well on Buster, but is broken on Bullseye and Bookworm indeed.

However, not a big issue to assign an explicit single port. We do it the same way on all other Torrent options, even that those all can be a port range assigned as well (where is also works as expected).

@asiaclonk
That the random port setting solves it as well makes sense, since the port (range) is then not respected at all. This is the reason why it works with Debian default settings, where random port is used, while the same port range 6881-6891 is given in the config as well.