Deluge not downloading or connecting/finding to peers/seeders

Required Information

root@DietPi:~# cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=5
G_DIETPI_VERSION_RC=1
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’

root@DietPi:~# echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 1

root@DietPi:~# uname -a
Linux DietPi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux

root@DietPi:~# echo $G_HW_MODEL_NAME
RPi 4 Model B (armv7l)

root@DietPi:~# deluged --version
deluged 2.0.3
libtorrent: 1.2.9.0
Python: 3.9.2
OS: Linux 5.15.32-v7l+

When I load a torrent, it shows 0 seeders, peers and does not connect to anyone. I know the torrent had over 100 seeders and peers. PLEASE HELP! Im not sure where to start with this issue. I have googled but im not sure what I am looking for.

I just refreshed installed dietpi on my Pi and installed and setup deluge. I made sure that the Debian-deluged user in the dietpi, and root group just to make sure there isn’t a permission issue. Also the chmod for the download directory is set to 0777 for the same reason. I also checked that the pi is connected to the internet and there is no firewall setup that would block the traffic. I also forwarded the 6881 port on my router to make sure it isn’t getting blocked.

I am connected to a windscribe vpn using wireguard conf file. However, deluge did not work when I took down the wireguard (using wg-quick down wg0).

I was able to fix the issue by using a random incoming port.

I realized that the External IP was showing as N/A and found the following forum post that explained that there is an issue when NOT using a random incoming port: Deluge 2.0.3 not able to get to network, 1.3.15 was working - Deluge Forum

Nasty, I’ll try to replicate.

Probably it’s this bug (seems upstream) where the listening IPs are concatenated falsely. Just strange that it survived so long without fix then: https://bugs.debian.org/1000456

Could you try to apply this change to the Python script and see whether then defining an explicit port (range) works?