Can only connect to trackers and detect external IPv4 address when I2P "mixed mode" is enabled #15227

Open
opened 2026-02-22 01:54:43 -05:00 by deekerman · 8 comments
Owner

Originally created by @RedSnt on GitHub (Nov 27, 2023).

qBittorrent & operating system versions

qBittorent: v4.6.1 x64
Qt: 6.4.3
OS: Windows 10 22H2 (10.0.19045) build 19045.3693
Libtorrent: 2.0.9.0
Boost: 1.83.0
OpenSSL: 1.1.1w
zlib: 1.3

What is the problem?

I played around with I2P and Proxy settings this weekend, and actually got I2P in mixed mode and SOCKS5 working together.
But then I decided I'd rather connect directly, but now I've found out that trackers are indefinitely stuck in "Not Contacted Yet". And since external IP is detected through contacting trackers, I'm stuck with no connections at all despite DHT working fine.
qBittorrent do detect my IPv6 address, just not my IPv4 address.

Steps to reproduce

  1. Turn on I2P and Mixed Mode
  2. Enable SOCKS5 proxy with everything checked
  3. Turn all of those settings off again

I did a lot of changing settings around, so might be more required than this.

Additional context

https://github.com/qbittorrent/qBittorrent/assets/6242718/acd86677-c2a2-4f57-8778-f607d8f9be2e

Log(s) & preferences file(s)

qbittorrent.log
qBittorrent_ini.zip

Originally created by @RedSnt on GitHub (Nov 27, 2023). ### qBittorrent & operating system versions qBittorent: v4.6.1 x64 Qt: 6.4.3 OS: Windows 10 22H2 (10.0.19045) build 19045.3693 Libtorrent: 2.0.9.0 Boost: 1.83.0 OpenSSL: 1.1.1w zlib: 1.3 ### What is the problem? I played around with I2P and Proxy settings this weekend, and actually got I2P in mixed mode and SOCKS5 working together. But then I decided I'd rather connect directly, but now I've found out that trackers are indefinitely stuck in "Not Contacted Yet". And since external IP is detected through contacting trackers, I'm stuck with no connections at all despite DHT working fine. qBittorrent do detect my IPv6 address, just not my IPv4 address. ### Steps to reproduce 1. Turn on I2P and Mixed Mode 2. Enable SOCKS5 proxy with everything checked 3. Turn all of those settings off again I did a lot of changing settings around, so might be more required than this. ### Additional context https://github.com/qbittorrent/qBittorrent/assets/6242718/acd86677-c2a2-4f57-8778-f607d8f9be2e ### Log(s) & preferences file(s) [qbittorrent.log](https://github.com/qbittorrent/qBittorrent/files/13479498/qbittorrent.log) [qBittorrent_ini.zip](https://github.com/qbittorrent/qBittorrent/files/13479547/qBittorrent_ini.zip)
Author
Owner

@RedSnt commented on GitHub (Nov 28, 2023):

Problem persists in 4.6.2. What's more is that I've noticed that qbittorrent uses 4 times the CPU power (from roughly 2.5% to ~10%) when I2P and mixed mode is disabled and I sometimes get the "28/11/2023 11.29 - x.x.x.x was blocked. Reason: I2P mixed mode restrictions." msg's. I guess it's trying really hard to not let anyone connect.

EDIT: Downgrading to v4.6.2 libtorrent v1.2.19.0 "obviously" fixed this as it doesn't have I2P support at all.

@RedSnt commented on GitHub (Nov 28, 2023): Problem persists in 4.6.2. What's more is that I've noticed that qbittorrent uses 4 times the CPU power (from roughly 2.5% to ~10%) when I2P and mixed mode is disabled and I sometimes get the "28/11/2023 11.29 - x.x.x.x was blocked. Reason: I2P mixed mode restrictions." msg's. I guess it's trying really hard to not let anyone connect. EDIT: Downgrading to v4.6.2 libtorrent v1.2.19.0 "obviously" fixed this as it doesn't have I2P support at all.
Author
Owner

@OvercookedBeef commented on GitHub (Dec 2, 2023):

The CPU issue might be related to https://github.com/arvidn/libtorrent/issues/7535

@OvercookedBeef commented on GitHub (Dec 2, 2023): The CPU issue might be related to https://github.com/arvidn/libtorrent/issues/7535
Author
Owner

@RedSnt commented on GitHub (Dec 2, 2023):

Ahh, yeah, that's probably related then. I didn't show it in the clip, but I did have i2p addresses in the tracker list.

@RedSnt commented on GitHub (Dec 2, 2023): Ahh, yeah, that's probably related then. I didn't show it in the clip, but I did have i2p addresses in the tracker list.
Author
Owner

@RedSnt commented on GitHub (Dec 3, 2023):

Just did some additional tests by adding http://tracker2.postman.i2p/announce as a tracker for all my torrents, and nothing happens in v4.6.2 libtorrent v1.2.19.0 ('cause i2p isn't supported).
Removed http://tracker2.postman.i2p/announce from the trackerlist of all the torrents then upgraded (sidegraded?) to v4.6.2 libtorrent v2.0.9.0, and true enough, no problems.
Then added http://tracker2.postman.i2p/announce to the trackerlist of all my torrents and as expected original problem appears, qBittorrent just stuck not being able to connect to anything.

Here's where it gets weird: Removing http://tracker2.postman.i2p/announce from the trackerlist of all my torrents doesn't fix the problem, still unable to connect. Even after restarting it persists. Which is making me think there's a setting somewhere that gets flipped because there shouldn't be anything persisting upon restarting otherwise, right?

When I then "sidegrade" back to v4.6.2 libtorrent v1.2.19.0 version and back to v4.6.2 libtorrent v2.0.9.0 without doing anything the problem is "fixed". Is something added and removed in the database or config between the versions? Because adding I2P trackers in this version somehow bricks something when I2P isn't enabled in the settings.

@RedSnt commented on GitHub (Dec 3, 2023): Just did some additional tests by adding http://tracker2.postman.i2p/announce as a tracker for all my torrents, and nothing happens in v4.6.2 libtorrent v1.2.19.0 ('cause i2p isn't supported). Removed http://tracker2.postman.i2p/announce from the trackerlist of all the torrents then upgraded (sidegraded?) to v4.6.2 libtorrent v2.0.9.0, and true enough, no problems. Then added http://tracker2.postman.i2p/announce to the trackerlist of all my torrents and as expected original problem appears, qBittorrent just stuck not being able to connect to anything. Here's where it gets weird: Removing http://tracker2.postman.i2p/announce from the trackerlist of all my torrents doesn't fix the problem, still unable to connect. Even after restarting it persists. Which is making me think there's a setting somewhere that gets flipped because there shouldn't be anything persisting upon restarting otherwise, right? When I then "sidegrade" back to v4.6.2 libtorrent v1.2.19.0 version and back to v4.6.2 libtorrent v2.0.9.0 without doing anything the problem is "fixed". Is something added and removed in the database or config between the versions? Because adding I2P trackers in this version somehow bricks something when I2P isn't enabled in the settings.
Author
Owner

@k4r4b3y commented on GitHub (Dec 4, 2023):

there is a problem with any tracker URL ending with .php: https://github.com/qbittorrent/qBittorrent/issues/19794#issuecomment-1783767767

When I then "sidegrade" back to v4.6.2 libtorrent v1.2.19.0 version and back to v4.6.2 libtorrent v2.0.9.0 without doing anything the problem is "fixed".

Do you mean you are able to connect to peers from postman's tracker now?

@k4r4b3y commented on GitHub (Dec 4, 2023): there is a problem with any tracker URL ending with .php: https://github.com/qbittorrent/qBittorrent/issues/19794#issuecomment-1783767767 >When I then "sidegrade" back to v4.6.2 libtorrent v1.2.19.0 version and back to v4.6.2 libtorrent v2.0.9.0 without doing anything the problem is "fixed". Do you mean you are able to connect to peers from postman's tracker now?
Author
Owner

@RedSnt commented on GitHub (Dec 4, 2023):

Do you mean you are able to connect to peers from postman's tracker now?

No. Removing the I2P trackers like postman's, then switching back and forth between the versions fixes the problem of not being able to start uploading and downloading again as was my original problem and reason to create this thread/report.

Maybe I2P addresses take priority in the code, and them being unreachable due to how it's disabled in the settings means libtorrent or qbittorrent is stuck in a loop unable to move on and parse other addresses?

@RedSnt commented on GitHub (Dec 4, 2023): > Do you mean you are able to connect to peers from postman's tracker now? No. Removing the I2P trackers like postman's, then switching back and forth between the versions fixes the problem of not being able to start uploading and downloading again as was my original problem and reason to create this thread/report. Maybe I2P addresses take priority in the code, and them being unreachable due to how it's disabled in the settings means libtorrent or qbittorrent is stuck in a loop unable to move on and parse other addresses?
Author
Owner

@Neustradamus commented on GitHub (Jan 27, 2025):

@arvidn has done a recent PR about I2P:

@Neustradamus commented on GitHub (Jan 27, 2025): @arvidn has done a recent PR about I2P: - https://github.com/arvidn/libtorrent/pull/7831
Author
Owner

@ErebosGR commented on GitHub (Jan 19, 2026):

trackers are indefinitely stuck in "Not Contacted Yet"

I got stuck with the same problem in v5.1.4 (libtorrent 2.0) as well.

I wanted to try I2P Mixed Mode, so I installed and enabled I2P, added I2P trackers to some of my already seeding torrents, and it was working fine. Then, I decided to remove I2P, disable it from qBittorrent and remove the I2P trackers I had added, but now those torrents are stuck with "Not Contacted Yet" and one of my CPU cores stays at 100% as soon as I launch qBittorrent.

edit: With i2pd uninstalled, I enabled I2P in qBittorrent and both issues were resolved... The trackers are not stuck at "Not Contacted Yet" and CPU usage went back down to idle levels.

@ErebosGR commented on GitHub (Jan 19, 2026): > trackers are indefinitely stuck in "Not Contacted Yet" I got stuck with the same problem in v5.1.4 (libtorrent 2.0) as well. I wanted to try I2P Mixed Mode, so I installed and enabled I2P, added I2P trackers to some of my already seeding torrents, and it was working fine. Then, I decided to remove I2P, disable it from qBittorrent and remove the I2P trackers I had added, but now those torrents are stuck with "Not Contacted Yet" and one of my CPU cores stays at 100% as soon as I launch qBittorrent. edit: With i2pd uninstalled, I enabled I2P in qBittorrent and both issues were resolved... The trackers are not stuck at "Not Contacted Yet" and CPU usage went back down to idle levels.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#15227
No description provided.