-
Notifications
You must be signed in to change notification settings - Fork 41
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
Torrust scrape has packed data errors and is not properly formatted #42
Comments
Thank you for the heads-up. I've implemented a fix for this in the coming release: aac9ac7 |
Thank you @WarmBeer. I have 2 questsions: 1# Will this implementation also work for udp scrape? 2# Any chance to have an explanation about |
1# No this was a fix for HTTP only, I'm looking into UDP atm. 2# The peer_timeout variable is the max amount of seconds a peer may be inactive (after last announce) before it is removed by the tracker. This is for peers that stopped announcing, but never sent a stopped event. Peers that send a stopped event get removed instantly. |
1# Great one, being able to use udp to scrape is also needed as most public trackers need to have it. 2# I understand. What is the best way to use torrust as private tracker to track user ratio? Is there some way to insert into database peers via api or something (that would also need to import event=stopped peers as well) |
I let @WarmBeer look into this, but UDP works fine as far as I'm aware on the development branch. |
Seems like I had some issues when testing on windows. Works fine when scraping udp on ubuntu. Not an issue with tracker. |
@WarmBeer Ok, this definitely is not fixed. Tested locally and scraped with https://github.com/medariox/scrapeer and https://github.com/Novik/ruTorrent |
I've tested the UDP scraping with https://pypi.org/project/tracker-scraper/ and the result was valid and as expected, so I'm not sure why it doesn't work in your case. Are you sure UDP is enabled on the tracker and does it run in Public mode? |
I'm trying to reproduce the error in the issue #42. I've created only the scaffolding for integration tests.
Hi @dev1z, Instead of using an external scraper, I'm trying to reproduce the error with an integration test in this PR. It would be nice if you could tell me the UDP request and response. And why the response is invalid. We could also change the workflow to run tests on different OSs in case your error happens only on Windows. |
Could you tell me if Gbitt still shows UDP scrape errors ? |
hi @Power2All, I'm working on a PR in which I want to add some integration tests. I have not yet added a test for the "scrape" request because I've had concurrency problems. @WarmBeer helped me to fix them. I run the test with a local UDP server, but you can easily change the code to use an external UDP public server. I've done a test with https://www.gbitt.info/ on this branch: https://github.com/torrust/torrust-tracker/tree/gbitt-udp-e2e-tests The test is currently failing on GitHub actions because you need to change the IP of the machine where you are executing the tests (here). If I run it locally with
I will upgrade the branch as soon as I finish the "scrape" test. In the long term, creating a new binary to run smoke tests against public-running UDP trackers could be useful. You could run those smoke tests on your CI/CD to test the UDP tracker after a deployment. |
hi @Power2All I've updated the gbitt-udp-e2e-tests branch with the "scrape" test. The basic behaviour for scrapping seems to work.
I'm also using qBittorrent for tests. I've added the tracker with the IP (like in the tests) and the domain. I git this error when using the domain: |
@josecelano That's really weird.
|
But it's working again. Although it seems now it does not work with the IP: |
@josecelano I found the problem. |
@Power2All please, let us know when you fix it so I can also fix it in this repo. On the other hand, I suppose that error is not related to this issue, isn't it? |
@josecelano Correct, this is for my own project. [Edit] |
@josecelano [Edit] |
@Power2All If reasonably possible can you please create the appropioate issue for qBittorrent or libbittorrent and link it here for tracking purposes? |
|
5dcea43 fix: initialize loggin once (Jose Celano) d2c69fa fix: test tear up (Jose Celano) 508803a refactor: extract function (Jose Celano) 1f258c1 test: integration test for udp scrape request (Jose Celano) f5aee03 fix: re-format with rust nightly (Jose Celano) 946e80a refactor: run tests with own udp tracker (#98) (Mick van Dijke) a27adf2 test: integration tests for udp tracker (Jose Celano) Pull request description: I'm trying to reproduce the error in issue #42. I've only created the scaffolding for integration tests so far. If there is no bug I want to use this scaffolding for other integration tests. If we consider them helpful. ACKs for top commit: da2ce7: ACK 5dcea43 Tree-SHA512: 1a939e0ac18d8c8261747a21c934dd55911a4b6bab0620d370337f599ea4e978783a4b9bef285970396f0ed06c101aa9b1d07cf39f92b3a3417329158c3ee5c1
Hello, there seems to be an error with packed data when scraping announce both udp and http/s.
The format should be
d5:filesd20
, but on gbitt and torrust it is random, sometimes it isd5:filesd50
,d5:filesd54
, etc. Thats why almost all scrapers returns invalid data for info hash.Seems like it is using aquatic source for scraping, but aquatic returns correct bytes of 20, where torrust doesn't.
@Power2All @WarmBeer
The text was updated successfully, but these errors were encountered: