Closed asadsm closed 5 years ago
it's bad default values on tracker-side, i've changed default cleanup timeout on tracker side. You can just change it manually (paste this line on tracker starting)
tracker.setPeerCollectorExpireTimeout(600);//10 mins
Thanks, I made that change. However I still see this show up as soon as the first client starts downloading.
Seeders: [1] Leechers: [0]
Seeders: [1] Leechers: [0]
[1011 08:52:30,579 Torrent channels manager thread] DEBUG - rk.HandshakeReceiver - setup new connection with Peer / for torrent 9C6BCECE81A3E9D151893642F77ECB234DC11CF3
[1011 08:52:30,580 pool-1-thread-2] DEBUG - client.SharedTorrent - Analyzing local data for QSG with 48 threads...
.
.
.
[1011 08:52:30,633 pool-1-thread-4 handle message for torrent 9C6BCECE81A3E9D151893642F77ECB234DC11CF3 peer: /] DEBUG - .storage.FileStorage - Opened byte storage file at /home/asmalik/torrent_test/QSG/QG_PF (7011164160+159344640 byte(s)).
Seeders: [1] Leechers: [1]
Seeders: [0] Leechers: [1]
Where it states that there is no seeder although the download completes.
This is noticeable however in some cases like the following:
Start tracker and seeder on machine A. Start leeching followed by seeding on machine B. Takes approx 70 sec for download complete Start leeching followed by seeding on machine C. Takes approx 65 sec for download complete Start leeching followed by seeding on machine D. Takes approx 112 sec for download complete.
Now wait for all 4 machines to seed. This however doesn't show up in the output which shows
Seeders: [2] Leechers: [2]
Once downloaded on all, we should get 4 seeders, A, B, C and D.
Then I start download on machine E. This machine for 2 minutes isn't able to pick up any peers:
[1011 09:01:03,405 torrent tracker announce thread] DEBUG - nt.announce.Announce - Starting announce for 0 torrents
.
.
.
[1011 09:03:33,578 torrent tracker announce thread] DEBUG - nt.announce.Announce - Started multi announce. Event NONE, torrents []
After which it only gets 3 peers instead of 4.
[1011 09:03:40,050 main] DEBUG - nounce.TrackerClient - Announcing STARTED to tracker with 0U/0D/7170508800L bytes...
[1011 09:03:40,202 main] INFO - CommunicationManager - Got 3 peer(s) ([Peer /10.87.... for torrent null, Peer /10.87... for torrent null, Peer /10.81.... for torrent null]) for 9C6BCECE81A3E9D151893642F77ECB234DC11CF3 in tracker response
It then completes the download in
Download took: 352.635321247 seconds
i can't reproduce this problem and also it looks curiously because peer can be removed on tracker in two cases:
tracker.setPeerCollectorExpireTimeout
it should not happen
can you check (e.g. using debugger) what removes peers (e.g. show stacktrace)? lines:
TrackedTorrent.java:114
TrackedTorrent.java:155
i don't understand how it's possibleSo it doesn't actually remove the initial seeder. It changes its status to STARTED
from COMPLETED
in the update
method in TrackedTorrent
on line 217 as the RequestEvent is NONE
.
i fixed this problem (https://github.com/mpetazzoni/ttorrent/commit/350c88f74fa73d42846c676c99581e380661194e). Thank you for help but i asked about problem with removing peers:)
Then I start download on machine E. This machine for 2 minutes isn't able to pick up any peers:
Oh so that's my fault. Sorry for not mentioning that. It was due to a firewall which prevented it from discovering peers.
I start by creating a torrent, announcing it via the tracker and then creating a seeder for it. I then start two clients to download the data using the torrent. Meanwhile I have a thread which prints out number of seeders and leechers for each
TrackedTorrent
every 20 seconds. This seems to be changing arbitrarily without me adding/removing clients.Starting the tracker and adding torrent:
Starting the initial seeder:
Starting the leechers:
The Seeder class start method is below:
Now when I start everything, the leechers are able to download the file/folder and then continue to seed. I use the following to output the status:
When I start only the seeder followed by the leechers I see the following:
This delays the download quite a bit because I don't see any log messages on the leecher side regarding the downloading. It then goes back to
Seeders: [1] Leechers: [2]
and the download does start but it's weird to see this happening. I can even see this after the download finishes on both leechers (which then continue to seed) as you can see below:Any idea what I'm doing wrong here?