-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
DHT returns nonexistent peers #759
Comments
These IPv4 are obviously hex-coded, so not actually 54.58.x.x/16. |
Hex encoded? All the IPv4s I've seen in the logs are in the usual dotted decimal form... If I check the logs after adding a normal torrent with at least one tracker, I can see the handshake manager logging the same decimal addresses that show up in the peer section. The AA and BB you see up there were added by me in place of the actual digits because I didn't want to post an IP here. |
Same exact behavior with rTorrent 0.9.6/libtorrent 0.13.6 on a totally different machine running Gentoo; I also tried with other trackerless torrents that I know for sure to be well-seeded. I really have no clue what is going on. |
Yes. Are you saying that downloading never starts?
That indeed can be the problem (although I never used without it): wiki page entry |
Exactly. Torrents is stuck since I can't connect to peers.
It's just a collection of Sci-Fi pics, so nothing controversial to post here. But my issue happens with every trackerless magnet or torrent file. Edit: seeders for that torrent went offline |
I also have issues at times with unpopular magnets without fall-back trackers added, and where deluge-console works. I just thought it was because rtorrent doesn't support uTP and i've read some clients favor uTP against TCP. Also, I know uTP features an extension to the protocol enabling NAT traversal, so can contact firewalled peers. Note, I don't have DHT port forwarded on deluge either(I'm on a new VPN provider not supporting port-forwarding - contrary to what most think - uploading can be done anyways, through outgoing connections as bittorrent spec is assymetrical). I was thinking that maybe it was because other clients bootstrap there DHT-nodes at the beginning, as many times I go by a rtorrent-reinstall(which I set to wipe clean e.g. old DHT - I probably should change that in my script!), so empty DHT, or that it haden't been enabled for some time because I use auto like you for DHT. Maybe it would help if adding to .rtorrent.rc(and maybe also change DHT to ON? like most other clients): schedule2 = dht_node_1, 5, 0, "dht.add_node=router.utorrent.com:6881" (Thanks chros73 for the lines ;) ) It's probably unrelated based on your logs, so sorry for meddling :) (Totally unrelated, I also have issues with magnets with fall-back trackers, because rtorrent imho is too unaggressive i.e. I believe that if pex is enabled and gets one hit, that don't even work, it stops connecting to the other trackers every 30 sec/3 times when under min_peers! I wish rtorrent had settings for changing tracker behaviour, as currently I need deluge-console installed(with enabled announcing to all trackers/tiers) for unpopular magnets, just to check that it's truly unpopular and not just a rtorrent-non-aggressive-issue.) Edit: That link with ubuntu, didn't work with me, and said no DHT peers to search for - when enabling DHT to ON it receives DHT nodes and searches them, but doesn't start downloading, as found 0 peers from the searches. With deluge-console it starts up right away , full speed - 24 MB's second! Latest deluge and rtorrent-ps-ch. Personally, i'm sad that I cannot rely on rtorrent solely, which i'd love! :( It's not about being more aggressive for better speeds per say, but just simply to be able to partake on torrents with only a small handfull of peers i.e. a compatibility issue. (Funny thing is that rtorrent by default is more aggressive than deluge in regards to failing trackers, where rtorrent reconnects in small intervals, and deluge just waits around for next re-announce long later - though i've changed that too in libtorrent-rasterbar settings with a deluge-plugin) Hope i'm not coming forth as complaining or something here, as that's seriously not my intention! I'm very grateful for the work of you guys! (rakshasa, pyroscope and chros73) :) |
Wanted to post a new issue regarding UDP/DHT connections problems but a comment here will avoid redundant tickets as my issue seems related. Since 0.9.7 (from Debian testing) I cannot use any magnet links as it fails to connect to any DHT servers. I've rolled back to 0.9.6 (from Debian stable), on the very same machine (WSL in my case) with my old config and magnet links worked straight away as expected. If I can help with any logs I would be happy to provide them but as far as I looked they didn't show any relevant stuff to me unfortunately. |
@SovalouRT , sorry for the late reply.
Conclusion, both are working here with the following condition (although yours needed about 30 minutes (!) to get the torrent file from a peer (similarly to utorrent v2.2.1)):
Note that I used this script to create fake torrent files from magnet links, although it shouldn't matter. |
Try AirVPN next time :)
Back in the day (with v0.9.6 :) ) there were some issues (I forgot what they were) with this setting, and value
There's a bug in rtorrent regarding to this, and the proposed fix is this (included in rtorrent-ps-ch).
See the comment above. @grolongo: did you open/forward ports? |
@chros73 no I didn't open/forward any ports I could do that, but I don't understand why I would have to do it now for 0.9.7 to work when it was working great on 0.9.6 without touching anything on my router? |
Thanks chros73 for your input! :) I found a deal I couldn't resist with a lifetime subscription to a VPN for very cheap and which had good speeds, so I cancelled my old and accepted that there weren't any port-forwarding because of that, but of course it's not optimal I know, though only using public torrents(and no issues with deluge-console because of this). I just don't get why getting one peer from PEX should stop connecting to other trackers(it's maybe a 0.5kb transfer or stalled), but that's the design the author intended and I will respect that of course :) Anyway, i'm gonna test 0.9.6 now too, as it seems it works better for non-forwarded ports according to grolongo, but would just be sad to miss out on '-ps-ch' newer versions :) Thanks again! Edit: Thanks alot for pointng me to the place in the source! :) I think that I maybe can change the PEX behaviour, but couldn't find the other stuff I wanted changed i.e. "max 3 times or if not getting 10 new peers" or "30 secs between", Not surprising as i'm no programmer and only do shell-scripting and haven't gone much beyond "hello world" when trying learning C :) |
Report back your findings :) (I have never used rtorrent with closed ports.)
Try out with it.
Well, me neither :) But there's a huge code change between these 2 releases (not just as the release notes suggests). |
I just installed latest rtorrent-ps, which was easier than manually installing rtorrent-0.9.6 and libtorrent-0.13.6, but if that's not good enough(I know pyroscope adds alot), then I can test with v0.9.6 vanilla too. For me it's the same with the ubuntu link - initially it states no peers to search DHT with, as a clean install, and when restarting, then after 5 secs, it searches DHT(because of the lines from chros73) and e.g. states '9/24 nodes replied', even without any forwarding, but never starts downloading/getting actual peers(even though it states announcing 2/3 peers, after the DHT node search). Edit: Okay, just in case I manually built rtorrent-0.9.6 and libtorrent-0.13.6, and the above done test is exactly the same. |
Thanks, that's what I thought, so it works the same as the new version. (And rtorrent-ps is fine to test with.) |
What OS, distrib do you use? |
@chros73 every cases example I described in previous posts on this thread happened on Debian on Windows Subsystem Linux, using rtorrent 0.9.6 from stable and 0.9.7 from testing repository. Note I also have a Raspberry Pi with rtorrent 0.9.6 on it (can't use 0.9.7 as it hasn't been updated in the raspbian repo yet) and running with the basic config I posted just before. The rtorrent on the Pi has also been running for years without any single problem using tracker and trackerless magnets, without ever opening/forwarding any port in my router and using these basic iptables settings:
if that can help. |
lol, at swedish site with a boat! :) The only thing i'll say is that when it for me says "no peers for dht search", then it's because I had an empty DHT, and even though the dht-nodes are updated after 5 secs, then when adding torrents after that, then it still won't work for some reason, so I restart rtorrent after adding the torrents and then it bootstraps and searches nodes(as the dht-nodes are updated with torrents loaded and not empty), but just didn't found peers for me in my try, for neither v0.9.7 or v0.9.6. The v0.9.6 that works for you, is that having another dht file than v0.9.7? If it has an old full DHT then that would be the difference i'd guess. Btw, it's up to you if you open ports or not(and I don't because of my VPN provider), but as you get no incoming connections you will only be able to upload on outgoing connections, which I'd guess would somewhat limit your sharing and hence performance, as the bittorrent spec uses tit-for-tat algo which chokes you often if not sharing - popular torrents doesn't really matter as so many seeds available, in my experience(i've used a socks5 proxy for many years before using rtorrent/VPN, which also doesn't support incoming connections, without any issues either whatsoever and fast speeds). Ohh, check your port is correctly opened also by e.g. canyouseeme.org Unrelated, but there'a a bug I believe in v0.9.7, where it reports &IPv4 fields even for Ipv4 connections(semantics of an IPv6 tracker extension protocol), so there's a line you can set in your .rtorrent.rc to bind to correct IP and send out to trackers so you're connectable, and that is in the wiki by chros73. I run always rtorrent from scripts or shell-functions so I just used(changed to non-vpn IP):
Edit: Sorry i'm an idiot, forget last part, as unrelated without VPN, as proper IP is used i'd guess. |
I think it does use a different one since I'm not using any of this in my old config for 0.9.6:
INPUT/INCOMING connections have always been set to DROP/REJECT (except for some SSH / Seafile server ports from time to time) on both my router and local machines and I never had any problem downloading though. @chros73 I'm going to try this: I'll do a clean install of my Debian WSL and download rtorrent 0.9.6 like I used to. Then I'll use my old config as normal and change it to the new one (still on 0.9.6 so) to see what happens. This way I could tell:
I could have done the same using my old config on 0.9.7 but now you get error messages because of new syntax options (hence the new config). I'll let you know. |
update: the new configuration works fine on 0.9.6, no port forwarding from my router needed nor specific firewall settings. I just loaded a magnet link and it started to download straight away: I still get So I guess that's a version issue, exact same .rtorrent.rc on the same machine works for 0.9.6 but not with 0.9.7, how can I troubleshoot that now? |
Are you sure that it was trackerless magnet? Is the above posted lubuntu iso working as well? |
So you now tested v0.9.6 with an empty or non-existent '/home/grolongo/rtorrent/.session/rtorrent.dht_cache', like with v0.9.7? (Just making sure the difference isn't a big old DHT cache on v0.9.6 compared to v0.9.7) Anyway, I guess the only thing to do then is compare the DHT logs between both runs/versions. |
The torrent downloading in the last screenshot is coming from a magnet link on the pirate bay (AFAIK this website is not using tracker anymore). So if it's not using tracker nor DHT am I downloading through peer exchange? Or am I confusing technologies here? I loaded the lubuntu magnet and you're right it's not starting, can't even fetch the torrent metadata, just stuck at
Yes, I always remove all rtorrent related directories from my home folder before testing new version or new config to make sure it's clean.
After what @chros73 said just above I think DHT just doesn't work on both version or configs, because of the lubuntu magnet I just tested which doesnt load: I must be confusing how it actually downloaded the torrent that worked (the one with the pixellated name in the screenshot), but if it downloaded without using tracker nor DHT, why wasn't isn't it downloading on 0.9.7 is a mystery. |
TPB uses fall-back trackers in there magnets, btw. You can check if peer-exchange got any hits by selecting the torrent, pressing arrow right and then check for: 'Peer exchange: enabled active(0/8)' e.g. As said, when it says no peers to search DHT, as it does when newly added files on clean install, then restart rtorrent and it will search DHT because of the added nodes scheduled in .rtorrent.rc after 5 secs, but unfortunetly, it doesn't help with finding peers :( (I'm guessing the restart is needed because DHT isn't started on fresh start without torrents and so adding new nodes to a disabled DHT will not work I guess, or else I don't get why a restart, or having DHT to ON, is needed) I also don't understand why it doesn't work in rtorrent, but works fine in e.g. deluge-console, but there must be some subtle differences in the DHT implementation. Anyway, sorry I cannot help you out with the issue, and i'm also personally sorry that I(/you) found another use-case which makes rtorrent a not good candidate for me unfortunately - I wish I knew C++ better than my "super elite skills" of being able to make a CLI calculator-type app, lol :) I tried adding in two extra DHT nodes additionally, as that is what deluge and qbittorrent uses(one of chros73 ones weren't used by deluge/qbittorrent, but I kept that too), but still it doesn't work, but used little higher numbers after the restart i.e. 13/32 peers replied it stated this time, but still no go :( It's also strange that deluge/qbittorrent shows much greater number of nodes/peers at startup from bootstrapping DHT, but rtorrent even with these two extra nodes added, never shows more than low 30's, and which was my thinking of adding in the extra nodes, although I don't know if the two set of numbers are even remotely related. Again deluge-console with cleaned-out DHT, so starting from scratch like rtorrent, starts downloading within 2 seconds with 30 connected seeds and 1 peer and full speed(no forwarding going on, neither regular nor DHT ports). A workaround is, I'd guess, to use danfolkes magnet2torrent.py script and set that as handler for magnets. I know you can use a simple shell-script to do the same, but that just makes a meta-torrent file which rtorrent supports, but no other client because it's not a true torrent, but just a torrent with the infohash from the magnet. The magnet2torrent.py script uses libtorrent-rasterbar through it's python-bindings(so need python-libtorrent or python3-libtorrent) to make a true torrent and retrieves metadata from the actual swarm so I guess it should work. Btw, I added a few lines to danfolkes version so that it after making the torrent will open the torrent with your standard defined torrent app and then delete the torrent-meta file afterwards: https://pastebin.com/dl/pujkSz56 (Place it somewhere under PATH, make it executable, and add as handler for magnets, but not torrents which should be kept as before set to rtorrent). Or use the regular version to run manually: https://github.com/danfolkes/Magnet2Torrent/blob/master/Magnet_To_Torrent2.py Sorry for long-winded'ness :) Edit: Sorry, the above workaround didn't work after I just tested it, sorry about that, it just keeps being stalled at "downloading metadata - this can take a while" - normally it's only a few secs it takes. I made the changed version recently and posted on deluge-forum because of an issue with deluge not supporting magnets only torrents when using labelplus plugin for auto-labeling/sorting(using reg-ex rules for file-extensions etc). Edit2: Still doesn't fix the rtorrent issue, but here's links for fixed magnet2torrent.py which now works with magnets without fallback-trackers also. The manual version I added a link to, means to not auto-load into default torrent-client afterwards, for use as manual tool: https://gist.github.com/mhertz/01842039bd9d056001c82d16e83dc4e4 Manual: https://gist.github.com/mhertz/c66dcb714c44d4725bd22f18003ae554 |
That's correct :) Conclusion is above. I've also updated the corresponding wiki page section. |
So that would explain I was able to download my file. I'll check the pex as you suggested, thanks!
I remember having this too on 0.9.7 and still no download just like you :/ So if for some reason I never noticed I was not using DHT (because I never opened any ports for rtorrent), I guess I was using fallback mechanisms to download from TPB. But now, how come I'm able to download fine from TPB using 0.9.6 (like in the screenshot with pixelated torrent title) but not in 0.9.7 using the same .rtorrent.rc? Does that make sense? |
Honestly I don't know, but I/we could download those magnets that include trackers using 0.9.7 without opening any port. |
Well, I just retested and even with no encryption, download never starts on 0.9.7 I guess I'm stuck on 0.9.6 for now |
Yeah, grolongo sorry again that I cannot help either! :( Well, there's also magnet/dht issues with v0.9.6, as chros73 and I reported previously in this thread, but if it works better for you, then of course that's the only important thing :) It was also reported little over a year ago an issue with magnets not working as good as deluge or transmission, in a report by mpv developer haasn 🙌 That report where with v0.9.6 also. Btw, I fixed the magnet2torrent.py script I mentioned earlier(added DHT-nodes for bootstrap, restarted DHT and added 2 sec break before feeding URI to libtorrent), but the resulting true torrent-file didn't start download in rtorrent either, as I should already have known! I don't know why I thought it would magically work while still without trackers, sorry! (I thought maybe some DHT-peers would get recorded in the torrent - I haven't read up on that part honestly) Anyway, if you need magnet-links tested for v0.9.6 or v0.9.7 from swedish boat-sites or alike :) or something else I could help test, then do drop me a line! :) Good luck! Btw, the DHT-crawling search sites are becoming exceedingly popular, as they have many more results to show, which is great for unpopular and/or old/rare content, and most of these sites don't use fallback-trackers in there magnets! However, as they are just the same 4 or 5 standard used trackers, then there's no guaranty either that it has the stuff anyway, especially as often used for rare content, so maybe not so much help anyway, as the DHT then still would be need to be functioning properly regardless. Also, I was thinking that it would be trivial to e.g. extend the standard script used for making fake torrents from magnets, to add 4-5 fall-back trackers to them, but still it wouldn't work always, only sometimes, which doesn't make it a full-proof solution unfortunately. I just tested aria2c, and that works too with the lubuntu magnet above and no forwarded ports. |
Sorry for off-topic and just a very quick question and I hope none of the involved parties mind :) @chros73, do you know what it means when defining a choke-groups's 'strings.tracker_mode' setting to 'aggressive'(instead of 'normal'), as i've also seen you've done in your configs? I'm referring to that normally we only have the tracker aggressiveness behavior very slightly togglable by raising 'throttle.min_peers.normal.set', but was wondering what that 'aggressive' option further was about? Thanks in advance. |
I think I will fallback to this aswell. With my 1 Gbps fiber internet I don't need to let rtorrent open on a box overnight for a download to finish anymore. Popular torrents end up downloading in less than 10 minutes even for files over 5 Go now. Still, for a different case, rtorrent is much better for seeding and leeching on the long term with many torrents loaded under a tmux/screen session. I see aria2c as the wget/curl of torrent/magnet file for single downloads, and that is fine for me at the moment. I'll try future rtorrent versions when they come out to see if it works again for me! |
You're most welcome, and sorry nothing came out of it :( (From my part i mean, - chros73 identified what needed to be done to fix it at least). Indeed nothing compares to rtorrent in tmux, it's lighweightness combined still with it's abundance of internal commands for scripting whatever your harts content(not even talking about the mind-blowing awesomeness that is the pyrocore tools combined with rtorrent-ps[-ch])! If only rtorrent opened up for tuning it alittle more in terms of aggressiveness, like libtorrent-rasterbar, then it would be a wet-dream of mine lol :) Anyway, aria2c is pretty nice and can be run either in tmux or as daemon and then you add more torrents or control stuff from xmlrpc calls(like rtorrent). There's good documentation e.g. for controlling aria2c from python(through xmlrpclib). I made a small script for adding torrents/magnets to running daemon and another for querying torrents from daemon. Keep in mind that the lubuntu magnet worked, but took 10 secs to begin I believe or thereabout. |
I don't remember :) But quickly searching through libtorrent project, I haven't seen any place where this setting is used :) |
Indeed, that's my source ;) Amazing work btw! Thanks again for all your help and input mate, I really appreciate that! :) |
I can confirm with rTorrent 0.9.6 (using PS mod) and rTorrent 0.9.7 (vanilla) running on Debian that DHT doesn't seem to work well. I configured DHT, ensuring my incoming port and DHT port (probably unneeded) had incoming connections working properly and tested with my own torrents without any trackers seeded from my home connection to my "seedbox" host running rTorrent with a different public IP, and nothing. All torrents get stuck fetching the "metadata" and it doesn't acquire any other information. I am willing to test and provide more information if needed. |
Also seeing this on el7 with rtorrent 0.9.6. Funny thing is, some magnet links seem to randomly work, others don't. The ones that don't will attempt to "resolve" for hours before I finally give up. I try the same magnet link (on the same machine) with transmission, and it will usually start downloading in < 10 minutes. |
Just use |
I had the same difficulties as everyone above - until I correctly opened/forwarded my ports within the "port_range =" value in the rtorrent config. Once this range was opened on my router the DHT instantly worked. FWIW. This is on 0.9.7 |
I have this trackerless magnet. When I add it in Transmission, after a couple of minutes the DHT search succeeds, the client connects with the other peers and begins to download.
When I load the same magnet in rTorrent, the DHT search does return some IPs, but they are not the same IPs that I see in Transmission. More precisely, rTorrent always come up with weird IPs starting with 54.58; these are obviously not the wanted peers, nor are reachable addresses, therefore no actual peer is added and the magnet gets stuck. I tried stopping every torrent except the interested one and this is what I see in the logs (torrent hash & IPs are censored):
For the sake of completeness I should say that both rTorrent and Transmission resolve the same number of peers, e.g. Transmission finds three peers online => rTorrent finds three peers too, all of them wrong, all of them starting with 54.58.
I'm running rTorrent on a Raspberry Pi armv6l, and I've experienced the same exact behavior with:
rTorrent 0.9.6 & libtorrent 0.13.6 from the Raspbian repos
rTorrent 0.9.6 & libtorrent 0.13.6 built by me
rTorrent 0.9.7 & libtorrent 0.13.7 from the latest commits, built by me, with and without the aligned flag (see issue #130)
Some lines from my config, even though I don't think they are relevant at all:
Ironically, if I start transmission I can see that one of the peers is seeding this torrent with libtorrent 0.13.6, so I assume that this is a highly specific case.
The text was updated successfully, but these errors were encountered: