Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All trackers get connection failed #3285

Open
fxcoudert opened this issue Jun 13, 2022 · 53 comments
Open

All trackers get connection failed #3285

fxcoudert opened this issue Jun 13, 2022 · 53 comments

Comments

@fxcoudert
Copy link
Collaborator

Opening a magnet link in Transmission very often leads to no peers being obtained, because none of the trackers can be connected to:

Capture d’écran 2022-06-13 à 17 44 11

On the same machine, same network, opening the same magnet link with another client will show most of the trackers are actually online and working:

Capture d’écran 2022-06-13 à 17 40 21

@GaryElshaw
Copy link
Contributor

I thought this might be symptomatic of me starting and stopping different builds. I've found a restart fixes everything.

@fxcoudert
Copy link
Collaborator Author

Restarting the app, even with clean slate / no ongoing transfers, does not fix it. It has been happening for a long while, several months. Usually peers are found by another way (DHT, I think? I am not an expert in torrent at all) so files can transfer at some point, but all trackers are in error.

@GaryElshaw
Copy link
Contributor

Sorry, i was meaning a computer restart :-(

@fxcoudert
Copy link
Collaborator Author

Two different torrent apps can connect fine to most of the trackers, in the same state. And I'm not restarting my computer, I have too many things on-going for that to happen. It does seem like a bug, anyway, if it requires a restart periodically to work.

@ckerr
Copy link
Member

ckerr commented Jun 14, 2022

@fxcoudert this appears to be a duplicate of #2546?

@ckerr ckerr added the needs clarification More info is needed before work can proceed label Jun 14, 2022
@fxcoudert
Copy link
Collaborator Author

Uh, you're right, sorry. Well there is new information, which is other software can definitely connect from the same computer/network/settings. I have no idea how to debug, any advice is welcome.

@ckerr
Copy link
Member

ckerr commented Jun 14, 2022

Usually I close the new issue in favor of the older one; however this one seems to be more actionable

@ckerr ckerr closed this as completed Jun 14, 2022
@ckerr ckerr reopened this Jun 14, 2022
@fxcoudert
Copy link
Collaborator Author

fxcoudert commented Jun 14, 2022

Full logs output, run with TR_CURL_VERBOSE=1 (as suggested in the previous issue):

2022-06-14 16:45:45 +0000 session.cc:747 [Renseignements] session.cc:747: Transmission version 3.00+ (c806a1435e) starting
2022-06-14 16:45:45 +0000 cache.cc:113 [Débogage] cache.cc:113: Maximum cache size set to 4.00 Mo (244 blocks)
2022-06-14 16:45:45 +0000 rpc-server.cc:914 [Débogage] rpc-server.cc:914: setting password-enabled to 'false'
2022-06-14 16:45:45 +0000 rpc-server.cc:876 [Renseignements] rpc-server.cc:876: Added '127.0.0.1' to host whitelist
2022-06-14 16:45:45 +0000 rpc-server.cc:876 [Renseignements] rpc-server.cc:876: Added '::1' to host whitelist
2022-06-14 16:45:45 +0000 rpc-server.cc:896 [Débogage] rpc-server.cc:896: setting our username to 'admin'
2022-06-14 16:45:45 +0000 net.cc:534 [Débogage] net.cc:534: Bound socket 7 to port 52794 on 0.0.0.0
2022-06-14 16:45:45 +0000 net.cc:534 [Débogage] net.cc:534: Bound socket 8 to port 52794 on ::
2022-06-14 16:45:45 +0000 tr-udp.cc:313 [] tr-udp.cc:313: Couldn't bind IPv4 socket [0.0.0.0]:52794: Address already in use (48)
2022-06-14 16:45:45 +0000 tr-dht.cc:287 [Renseignements] tr-dht.cc:287: Initializing DHT
2022-06-14 16:45:45 +0000 tr-dht.cc:194 [Débogage] tr-dht.cc:194: Bootstrapping from 48 IPv6 nodes
2022-06-14 16:45:45 +0000 tr-dht.cc:370 [Débogage] tr-dht.cc:370: DHT initialized
2022-06-14 16:45:45 +0000 web.cc:554 [Débogage] web.cc:554: CURLOPT_SHARE ended at 6
2022-06-14 16:45:45 +0000 web.cc:125 [Renseignements] web.cc:125: Will verify tracker certs using envvar CURL_CA_BUNDLE: none
2022-06-14 16:45:45 +0000 web.cc:126 [Renseignements] web.cc:126: NB: this only works if you built against libcurl with openssl or gnutls, NOT nss
2022-06-14 16:45:45 +0000 web.cc:127 [Renseignements] web.cc:127: NB: Invalid certs will appear as 'Could not connect to tracker' like many other errors
2022-06-14 16:45:45 +0000 tr-lpd.cc:271 [Débogage] tr-lpd.cc:271: Initialising Local Peer Discovery
2022-06-14 16:45:45 +0000 tr-lpd.cc:364 [Débogage] tr-lpd.cc:364: Local Peer Discovery initialised
2022-06-14 16:45:45 +0000 rpc-server.cc:876 [Renseignements] rpc-server.cc:876: Added '127.0.0.1' to host whitelist
2022-06-14 16:45:45 +0000 torrent-metainfo.cc:708 [Erreur] torrent-metainfo.cc:708: no bencoded data to parse (92)
2022-06-14 16:45:45 +0000 session.cc:2065 [Renseignements] session.cc:2065: Loaded 1 torrent
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] 185.193.125.139:6969: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] open.stealth.si:80: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] tracker.opentrackr.org:1337: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] tracker.openbittorrent.com:6969: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] opentracker.i2p.rocks:6969: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] tracker.0x.tf:6969: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] movies.zsw.ca:6969: DNS lookup succeeded
2022-06-14 16:45:46 +0000 announcer-udp.cc:472 [Débogage] 47.ip-51-68-199.eu:6969: DNS lookup succeeded
2022-06-14 16:46:04 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 4 IPv6 peers from DHT
2022-06-14 16:46:04 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 1 IPv6 peers from DHT
2022-06-14 16:46:05 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 1 IPv6 peers from DHT
2022-06-14 16:46:05 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 4 IPv6 peers from DHT
2022-06-14 16:46:05 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 3 IPv6 peers from DHT
2022-06-14 16:46:06 +0000 torrent-magnet.cc:79 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: metadata is 20626 bytes in 2 pieces
2022-06-14 16:46:06 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 9 IPv6 peers from DHT
2022-06-14 16:46:06 +0000 torrent-magnet.cc:396 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: next piece to request: 0
2022-06-14 16:46:06 +0000 torrent-magnet.cc:396 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: next piece to request: 1
2022-06-14 16:46:08 +0000 torrent-magnet.cc:336 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: got metadata piece 1 of 4242 bytes
2022-06-14 16:46:08 +0000 torrent-magnet.cc:370 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: saving metainfo piece 1... 1 remain
2022-06-14 16:46:09 +0000 blocklist.cc:89 [Renseignements] blocklist.cc:89: Blocklist 'blocklist.bin' has 224906 entries
2022-06-14 16:46:10 +0000 torrent-magnet.cc:396 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: next piece to request: 0
2022-06-14 16:46:11 +0000 peer-io.cc:695 [Débogage] peer-io.cc:695: tr_netOpenPeerSocket returned 37
2022-06-14 16:46:12 +0000 peer-io.cc:695 [Débogage] peer-io.cc:695: tr_netOpenPeerSocket returned 37
2022-06-14 16:46:12 +0000 peer-io.cc:309 [Débogage] [2a01:e34:ec28:8cb0:b0b0:d4d0:2946:2d90]:62760: event_read_cb err: res:0, what:17, errno:0 (Undefined error: 0)
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:13 +0000 peer-io.cc:525 [Débogage] [2800:150:13e:2347:e54f:b6e8:6b7c:47]:26184: utp_on_error -- errcode is 60
2022-06-14 16:46:13 +0000 peer-io.cc:525 [Débogage] [2800:150:13e:2347:e521:c6ab:3b73:cc6e]:26184: utp_on_error -- errcode is 60
2022-06-14 16:46:13 +0000 peer-io.cc:525 [Débogage] [2800:150:13e:2347:ece9:a3bb:bfc1:962c]:26184: utp_on_error -- errcode is 60
2022-06-14 16:46:13 +0000 peer-io.cc:525 [Débogage] [2800:150:13e:2347:3c51:eb55:d5c:d692]:26184: utp_on_error -- errcode is 60
2022-06-14 16:46:13 +0000 peer-io.cc:309 [Débogage] [68.169.181.143]:28141: event_read_cb err: res:0, what:17, errno:0 (Undefined error: 0)
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 97 IPv6 peers from DHT
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:13 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:14 +0000 torrent-magnet.cc:336 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: got metadata piece 0 of 16384 bytes
2022-06-14 16:46:14 +0000 torrent-magnet.cc:370 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: saving metainfo piece 0... 0 remain
2022-06-14 16:46:14 +0000 torrent-magnet.cc:375 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxxx: metainfo piece 0 was the last one
2022-06-14 16:46:14 +0000 torrent.cc:1551 [Renseignements] xxxxxxxxxxxxxxxxxxxxxxxx: Pausing torrent
2022-06-14 16:46:14 +0000 verify.cc:48 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx: verifying torrent...
2022-06-14 16:46:14 +0000 verify.cc:151 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx: Verification is done. It took 0 seconds to verify 3952254677 bytes (3952254677 bytes per second)
2022-06-14 16:46:27 +0000 tr-dht.cc:613 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx: Learned 25 IPv6 peers from DHT
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] 185.193.125.139:6969: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at 185.193.125.139:6969: Tracker '185.193.125.139:6969' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at 185.193.125.139:6969: Announce error: Connection failed (Retrying in 328 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] tracker.opentrackr.org:1337: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at tracker.opentrackr.org:1337: Tracker 'tracker.opentrackr.org:1337' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at tracker.opentrackr.org:1337: Announce error: Connection failed (Retrying in 308 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] tracker.openbittorrent.com:6969: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at tracker.openbittorrent.com:6969: Tracker 'tracker.openbittorrent.com:6969' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at tracker.openbittorrent.com:6969: Announce error: Connection failed (Retrying in 333 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] movies.zsw.ca:6969: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at movies.zsw.ca:6969: Tracker 'movies.zsw.ca:6969' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at movies.zsw.ca:6969: Announce error: Connection failed (Retrying in 350 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] open.stealth.si:80: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at open.stealth.si:80: Tracker 'open.stealth.si:80' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at open.stealth.si:80: Announce error: Connection failed (Retrying in 356 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] tracker.0x.tf:6969: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at tracker.0x.tf:6969: Tracker 'tracker.0x.tf:6969' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at tracker.0x.tf:6969: Announce error: Connection failed (Retrying in 333 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] opentracker.i2p.rocks:6969: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at opentracker.i2p.rocks:6969: Tracker 'opentracker.i2p.rocks:6969' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at opentracker.i2p.rocks:6969: Announce error: Connection failed (Retrying in 355 seconds)
2022-06-14 16:46:51 +0000 announcer-udp.cc:550 [Débogage] 47.ip-51-68-199.eu:6969: Connection failed
2022-06-14 16:46:51 +0000 announcer.cc:1278 [Débogage] xxxxxxxxxxxxxxxxxxxxxxxx at 47.ip-51-68-199.eu:6969: Tracker '47.ip-51-68-199.eu:6969' scrape error: Connection failed (Retrying in 20 seconds)
2022-06-14 16:46:51 +0000 announcer.cc:986 [] xxxxxxxxxxxxxxxxxxxxxxxx at 47.ip-51-68-199.eu:6969: Announce error: Connection failed (Retrying in 313 seconds)

@Coeur
Copy link
Collaborator

Coeur commented Jun 21, 2022

I've been encountering the same issue for at least a couple of months. I don't think this was happening in September 2021.
If one has the courage, we could do dichotomous differences to pinpoint where the regression occurred.

@ckerr
Copy link
Member

ckerr commented Jun 21, 2022

I've been encountering the same issue for at least a couple of months. I don't think this was happening in September 2021. If one has the courage, we could do dichotomous differences to pinpoint where the regression occurred.

I'm not seeing this error so I'd be happy for the help. Does seem like a pretty big ask, though.

@fxcoudert
Copy link
Collaborator Author

fxcoudert commented Jun 22, 2022

It's going to be a long work :(

Technical question: if I do git checkout 7ca0b4cc25ddb1935294556c123df7db8d9ccfe2, does it also restore the submodules at the state they had for that commit, or not? If not, what needs to be done?


I can reproduce the bug with:

Actually, the 3.00 binary has the same issue, so bisection is probably not the right way to go…
I'm testing with this magnet link: echo -n 'bWFnbmV0Oj94dD11cm46YnRpaDpCODc5NDU5MUIzOEM3RkU5MzNCOUUzRTEwMTg4MjIzMEY5RkI4QzI3JmRuPUJldHRlciUyMENhbGwlMjBTYXVsJTIwUzA2RTA3JTIwMTA4MHAlMjBXRUIlMjBIMjY0LUNBS0VTJnRyPXVkcCUzQSUyRiUyRjE4NS4xOTMuMTI1LjEzOSUzQTY5NjklMkZhbm5vdW5jZSZ0cj11ZHAlM0ElMkYlMkZ0cmFja2VyLm9wZW50cmFja3Iub3JnJTNBMTMzNyZ0cj11ZHAlM0ElMkYlMkZ0cmFja2VyLm9wZW5iaXR0b3JyZW50LmNvbSUzQTY5NjklMkZhbm5vdW5jZSZ0cj11ZHAlM0ElMkYlMkZtb3ZpZXMuenN3LmNhJTNBNjk2OSUyRmFubm91bmNlJnRyPXVkcCUzQSUyRiUyRm9wZW4uc3RlYWx0aC5zaSUzQTgwJTJGYW5ub3VuY2UmdHI9dWRwJTNBJTJGJTJGdHJhY2tlci4weC50ZiUzQTY5NjklMkZhbm5vdW5jZSZ0cj11ZHAlM0ElMkYlMkZvcGVudHJhY2tlci5pMnAucm9ja3MlM0E2OTY5JTJGYW5ub3VuY2UmdHI9dWRwJTNBJTJGJTJGNDcuaXAtNTEtNjgtMTk5LmV1JTNBNjk2OSUyRmFubm91bmNl' | base64 --decode

@Coeur
Copy link
Collaborator

Coeur commented Jun 26, 2022

Can you try, @fxcoudert, to change those two lines:

set(TR_USER_AGENT_PREFIX "3.00+")
set(TR_PEER_ID_PREFIX "-TR300Z-")

To:

set(TR_USER_AGENT_PREFIX "3.01")
set(TR_PEER_ID_PREFIX "TR3001")

I had a few torrents unblocked (but not all) by changing my version number: the issue could come from trackers banning us?

@fxcoudert
Copy link
Collaborator Author

@Coeur it did not change anything for me.

@fxcoudert
Copy link
Collaborator Author

Still occurring at e9a7ddf
I can reproduce with a public torrent and public tracker: https://download.manjaro.org/kde/21.3.2/manjaro-kde-21.3.2-220704-linux515.iso.torrent

On the same machine, with this torrent:

  • qBittorrent says it can connect to udp://tracker.opentrackr.org:1337 and retrieve 83 seeds.
  • Transmission says "Connection failed"

@lpla
Copy link

lpla commented Sep 16, 2022

I had this issue today, again. I tried to restart the app several times, but sadly the error kept showing up in all trackers (but tracker.gbitt.info:80, which retrieved clients that were not connected with, I don't know why).

Instead of restarting the computer as I usually do, I tried to modify Transmission settings and restart the app, doing it one by one to find anything that could fix it. The first thing I changed was the listening port to a random one.

That worked.

@TheFalcon81
Copy link

I am also having this problem with many of the recent v4 for mac nightly builds. very annoying. Not an issue with other BT clients. Never had this issue on version 3.0 on my old intel mac.

@lluisd
Copy link

lluisd commented Jan 24, 2023

I also have that problem now, it was working fine some weeks ago. I solved it by not using Transmission from docker and use the Synology community package.

I get this errors (not solved with docker and container restarts)
image

@fxcoudert
Copy link
Collaborator Author

fxcoudert commented Jan 24, 2023

I still get this problem with Transmission 4.0.0-beta.3 (634b1e8). It makes Transmission unusable for me. I have used different other clients with no issue, on the exact same torrents, same network, etc.

The tracker says help wanted and I am willing to spend time and effort in debugging this, but I have reported all the logs and have no idea how to investigate further. I need guidance, please. @ckerr

@ckerr
Copy link
Member

ckerr commented Jan 25, 2023

@fxcoudert Hmmm 🤔 the torrents you shared earlier are working for me. Also from your log messages above it looks like DHT is working for you, and DHT uses UDP for package transport, so it's apparently not a firewall issue.

OK, I am just guessing here on how I would start tracking this down this if I were on a system where I could reproduce the problem....

Since we know UDP packets are working, but announcing via UDP isn't, my guess is that either DNS lookup is failing or we're not able to send a connect request to the tracker. Let's find out if either of those are the case. Try building with these tracers so we can see what announcer-udp is up to:

https://gist.githubusercontent.com/ckerr/8fa07b82a99b70e2866887dd69fb3195/raw/ed0287e11c9397650cee8724d833088411d54937/tracers.diff

Also if it is a DNS failure, try running nslookup from the command line for that server's name.

@dantearmok
Copy link

dantearmok commented Apr 17, 2023

Please see #5146

And, fwiw, I'm seeing the problem with both udp and http trackers.

eg: http://tracker.trackerfix.com:80/announce

What can we provide to help nail down this issue?

@adam-bauernfeind
Copy link

adam-bauernfeind commented Jul 7, 2023

Hi!
I have the same issue: using transmission with HTTP trackers always ends up with connection error. What new I have: if I close the app, down-up my wired connection, then start it again, the problem goes away for a time. Simply restarting the app does not work. The tracker is always reachable and I can repeat this as many times as I want without restarting my machine and the same things happens every time; it's deterministic. I think its not a DNS cache problem, because the tracker's IP address never changed (it's a fix IP).

Ubuntu 22.04 / Transmission 3.0

@tgildea
Copy link

tgildea commented Sep 18, 2023

al3xtjames' solution worked for me-- I had another application listening on the port Transmission was trying to use. That could explain why a reboot is fixing it for some. Not to say that someone else isn't experiencing a resource leak of some kind, but in my case it was a simple port conflict.

@Scratch-net
Copy link

Same for me. While transmission (4.0.2 and 4.0.3) seems to get banned on most public trackers, Utorrent works on the same machine at the same time

@twistedpixel
Copy link

twistedpixel commented Oct 4, 2023

Not sure if this is completely related but while downloading, I quite often will notice that after several hours I am connected to perhaps “3 of 7 peers” and the download rate is at a crawl. Trying to update the trackers does nothing or fails but simply closing Transmission and reopening it results in a huge boost in peers. I’m guessing the trackers update correctly at that point and suddenly I’m connected to 20 of 50 peers” or whatever - in any case: significantly more than before.

This is consistent and repeatable in my case.

Edit: I should also note that I do not need to down my network connection as others have mentioned. I quit and then immediately start up again.

@m4dm4x1337
Copy link

m4dm4x1337 commented Oct 28, 2023

Hi,

I can definitely confirm that this is a bug. It only occurs if:

1.) bind-address-ipv4 is 0.0.0.0 or 127.0.0.1
2.) bind-address-ipv6 is fe80::
3.) a http/https tracker is connected (tcp connection)

Solution: Use the IP address associated with your default interface as bind-address-ipv4. For example, if your traffic goes through eth0, and eth0 has the IP address 192.168.1.100, then this IP address should be used as bind-address-ipv4.

What happens under the hood is this:

root@debian-rpi64:~# LANG=C curl -4ksv --interface 127.0.0.1 http://tracker.openbittorrent.com:80/announce
*   Trying 193.189.100.188:80...
* Name '127.0.0.1' family 2 resolved to '127.0.0.1' family 2
* Local port: 0
* Immediate connect fail for 193.189.100.188: Invalid argument
* Failed to connect to tracker.openbittorrent.com port 80 after 15 ms: Couldn't connect to server
* Closing connection 0

The transmission daemon code needs to be modified so that the socket is bound to the default interface when connecting a tracker over tcp.

@Coeur
Copy link
Collaborator

Coeur commented Oct 30, 2023

Hum, 0.0.0.0 is the default:

V(TR_KEY_bind_address_ipv4, bind_address_ipv4, std::string, "0.0.0.0", "") \

@m4dm4x1337
Copy link

I have updated my previous comment and added this line: 2.) bind-address-ipv6 is fe80::

fe80:: is often used to disable ipv6, it's still a bug, because setting bind-address-ipv6 to fe80:: should not affect ipv4 connections, but it does affect it.

There is no bug if bind-address-ipv6 has the default value ::

@LunarN0v4
Copy link

This is still happening on the latest version of Transmission Qt (openbittorrent is dead, but opentrackr isn't).
image

@Scratch-net
Copy link

It helped me to change incoming port. Maybe it was a coincidence tho

@ZachBytes
Copy link

@LunarN0v4 Open Command Prompt and run netstat -ab, take a look and see if your Transmission listening port is being used by another program, if it is, change the port and try again.

@mongotron
Copy link

I can definitely confirm that this is a bug. It only occurs if:

1.) bind-address-ipv4 is 0.0.0.0 or 127.0.0.1 2.) bind-address-ipv6 is fe80:: 3.) a http/https tracker is connected (tcp connection)

...

There is no bug if bind-address-ipv6 has the default value ::

@m4dm4x1337 Are you saying this issue occurs if ALL or ANY of your points are true? I am still experiencing this issue with http trackers but my IP bindings are not set as you describe.

settings.json:

"bind-address-ipv4": "10.96.0.38",
"bind-address-ipv6": "::",

transmission.log:

[2024-01-04 04:48:01.082] WRN [torrent name] at tracker.trackerfix.com:80 Couldn't parse scrape response: no bencoded data to parse (84) (announcer-http.cc:662)
[2024-01-04 05:18:01.080] WRN [torrent name] at tracker.trackerfix.com:80 Couldn't parse scrape response: no bencoded data to parse (84) (announcer-http.cc:662)
[2024-01-04 05:48:01.082] WRN [torrent name] at tracker.trackerfix.com:80 Couldn't parse scrape response: no bencoded data to parse (84) (announcer-http.cc:662)
[2024-01-04 06:18:01.080] WRN [torrent name] at tracker.trackerfix.com:80 Couldn't parse scrape response: no bencoded data to parse (84) (announcer-http.cc:662)
[2024-01-04 06:48:01.086] WRN [torrent name] at tracker.trackerfix.com:80 Couldn't parse scrape response: no bencoded data to parse (84) (announcer-http.cc:662)
[2024-01-04 07:18:01.077] WRN [torrent name] at tracker.trackerfix.com:80 Couldn't parse scrape response: no bencoded data to parse (84) (announcer-http.cc:662)

@m4dm4x1337
Copy link

@mtraynor7

It happens if all 3 points are true.

fe80:: is used to disable IPv6 and that somehow causes TCP4 connections to an http tracker to be bound to the loopback interface.

The docs say that libcurl is used under the hood ( https://github.com/transmission/transmission/blob/main/docs/Environment-Variables.md ), and if TR_CURL_VERBOSE is set to 1, additional debug information is logged. I testet this a while ago and the error messages I saw were the same as the ones in my example above (“Invalid argument”). That's why I'm sure TCP4 connections are bound to lo when bind-address-ipv6 is fe80::

IPv6 settings shouldn't affect TCP4 connections, so that's a bug...

@tearfur
Copy link
Member

tearfur commented Jan 12, 2024

fe80:: is used to disable IPv6 and that somehow causes TCP4 connections to an http tracker to be bound to the loopback interface.

@m4dm4x1337 You are literally telling Transmission to bind to the loopback interface when you specify "bind-address-ipv4": "127.0.0.1", so I'm confused what you are on about.

It sounds like you've got both IPv4 and IPv6 public Internet, so if you set "bind-address-ipv6": "fe80::" and "bind-address-ipv4": "0.0.0.0", you should find that the IPv4 announce succeeds, but IPv6 announce and scrape fails.

Maybe scraping can be done better, but I think this is a normal result.

@m4dm4x1337
Copy link

fe80:: is used to disable IPv6 and that somehow causes TCP4 connections to an http tracker to be bound to the loopback interface.

@m4dm4x1337 You are literally telling Transmission to bind to the loopback interface when you specify "bind-address-ipv4": "127.0.0.1", so I'm confused what you are on about.

It sounds like you've got both IPv4 and IPv6 public Internet, so if you set "bind-address-ipv6": "fe80::" and "bind-address-ipv4": "0.0.0.0", you should find that the IPv4 announce succeeds, but IPv6 announce and scrape fails.

Maybe scraping can be done better, but I think this is a normal result.

@tearfur It is not a normal result or the expected behaviour.

First, you need to understand why people are using fe80:: as bind-address-ipv6. Some people, like me, for example, disable IPv6 for security reasons on the kernel level by adding "ipv6.disable=1" to the kernel cmdline. Any IPv6 related commands or function calls will not work on such a system. Unfortunately, transmission is/was unable to handle that correctly (See Issue #86).

To get around this other issue, people have used fe80:: as bind-address-ipv6 so that transmission doesn't try to make IPv6 connections. It looks like this other bug was recently fixed. But even if that bug has been fixed, the conclusion that an IPv4 connection must be bound to the lo interface just because the IPv6 address is also bound to lo, is incorrect. It is absolutely possible and permissible that IPv4 and IPv6 are bound to different interfaces.

There are certainly many reasons why someone would use fe80:: as bind-address-ipv6, for example, maybe you simply want to temporarily disable IPv6 for a specific reason. I recommend testing it yourself. Use the values "bind-address-ipv6": "fe80::" and "bind-address-ipv4": "0.0.0.0" and then add HTTP trackers to the tracker list of your torrent. Preferably those that do not have AAAA DNS records and therefore no IPv6 addresses. Because then the incorrect behavior becomes more clear.

What will happen is that all HTTP tracker connections will fail, even though IPv4 is bound to all interfaces due to the 0.0.0.0 address. And that's buggy behavior, not normal behavior :)

The correct behaviors would be to:

1.) Let libcurl decide which IP protocol version to use and which interface to bind to.
or
2.) Determine if IPv4 and/or IPv6 routing is possible or not. If impossible, don't use it. A simple example of how to do that in the terminal:

#!/bin/sh

IFACE4=$(ip -4 route get "$( dig +short google.com A )" 2>/dev/null | grep -m1 -oP 'dev \K\S+')
IFACE6=$(ip -6 route get "$( dig +short google.com AAAA )" 2>/dev/null | grep -m1 -oP 'dev \K\S+')

if [ -n "$IFACE4" ]; then
  echo "Bro, bind to iface $IFACE4 when making IPv4 connections"
else
  echo "Bro, IPv4 routing is not possible on this computer"
fi

if [ -n "$IFACE6" ]; then
  echo "Bro, bind to iface $IFACE6 when making IPv6 connections"
else
  echo "Bro, IPv6 routing is not possible on this computer"
fi

I could bet that there is a code snippet in the transmission that causes explicit binding for IPv4 connections based on (wrong) IPv6 properties.

@tearfur
Copy link
Member

tearfur commented Jan 12, 2024

I'd like to make it clear that I understand the need for some people to disable IPv6, and though we do not have any official way to do that right now, I'm not arguing against it either.

I recommend testing it yourself. Use the values "bind-address-ipv6": "fe80::" and "bind-address-ipv4": "0.0.0.0" and then add HTTP trackers to the tracker list of your torrent

Yes I did test on 8e7fc76 before writing #3285 (comment). Like I said, IPv4 announce will succeed, while IPv6 announce and scrape will fail.

1.) bind-address-ipv4 is 0.0.0.0 or 127.0.0.1

I reproduced your IPv4 Invalid Argument curl log output only when setting "bind-address-ipv4": "127.0.0.1". It will be a bug if "bind-address-ipv4": "0.0.0.0" produced the same behaviour, but that was not the case in my tests.

I'm very curious why you've suggested binding to 127.0.0.1 in the first place, of course that's not gonna work.

It is absolutely possible and permissible that IPv4 and IPv6 are bound to different interfaces.

Absolutely, and I think we have that currently.

I could bet that there is a code snippet in the transmission that causes explicit binding for IPv4 connections based on (wrong) IPv6 properties.

To my best knowledge, if there is a bug, you'll be able to find it if you start around here and trace upwards in the call stack:

[[nodiscard]] constexpr auto ipProtocol() const

[[nodiscard]] auto bind_address() const

Please feel free to take a look.

@arbv
Copy link

arbv commented Jun 7, 2024

I have the same issue (running 4.0.6 from NixOS repos).

@arbv
Copy link

arbv commented Jun 7, 2024

I have the same issue (running 4.0.6 from NixOS repos).

In my case it was caused by the fact that Transmission could not access /run/systemd/resolve (I use systemd-resolved) due to systemd unit hardening. See here: NixOS/nixpkgs#98904 (comment)

Something similar might be happening on other distribution. If you experience this - check the contents of your Tranmission's systemd, AppArmor profiles and similar security-related things.

@radicalaction
Copy link

tsm
I restarted my machine, so downloads started. But the error messages didn't go away

@Coeur
Copy link
Collaborator

Coeur commented Jul 11, 2024

@radicalaction An HTTP code starting with a 5, like 521, means it's an issue on the server/tracker side, not the client side.

@radicalaction
Copy link

@radicalaction An HTTP code starting with a 5, like 521, means it's an issue on the server/tracker side, not the client side.

Seems that you're right. Thanks!

@Hazpartame
Copy link

Hello,

I'm in the same situation here.

@matiasw
Copy link

matiasw commented Oct 1, 2024

I am also affected by this issue. With the latest 4.1.0-dev (ed2c6c4085) version from Git, I get "IPv4 connection failed" for every tracker. Selecting "Show more details" gives "Got a scrape error 'Could not connect to tracker'".

@d03j
Copy link

d03j commented Nov 3, 2024

same here using 4.0.6 (38c1649) in a container (lscr.io/linuxserver/transmission:latest).

I can resolve dns (e.g. ping github.com) from inside the container without any problems.

setting the container to a static IP address and "bind-address-ipv4" to that address does nothing.

@Luigin-01
Copy link

I had the same issue. I'm using Transmission-qt v4.0.6 (38c1649) on a PC with Windows 11. I opened settings.json located in C:\Windows\ServiceProfiles\LocalService\AppData\Local\transmission-daemon. There I changed "bind-address-ipv4": from "0.0.0.0", to "MyIPAddress". Then restarted the transmission daemon and EUREKA!!!!! Everything is working like a charm

@d03j
Copy link

d03j commented Nov 18, 2024

same here using 4.0.6 (38c1649) in a container (lscr.io/linuxserver/transmission:latest).

I can resolve dns (e.g. ping github.com) from inside the container without any problems.

setting the container to a static IP address and "bind-address-ipv4" to that address does nothing.

Nevermind, the issue was the way I had my container set up. When I had it in a network I use for a few containers, including flexget, it couldn't connect to udp trackers but If I create the container using the default podman network (no --net ...) in podman 5.2.3 it works flawlessly,

@angelgarrido
Copy link

I had the same issue. I'm using Transmission-qt v4.0.6 (38c1649) on a PC with Windows 11. I opened settings.json located in C:\Windows\ServiceProfiles\LocalService\AppData\Local\transmission-daemon. There I changed "bind-address-ipv4": from "0.0.0.0", to "MyIPAddress". Then restarted the transmission daemon and EUREKA!!!!! Everything is working like a charm

Using docker image linuxserver/transmission Version 4.0.6-r0-ls272

Exactly the same happened to me, changing binding address to the specific docker ip assigned address, and trackers connections started working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests