atomashpolskiy / bt

BitTorrent library and client with DHT, magnet links, encryption and more
https://atomashpolskiy.github.io/bt/
Apache License 2.0
2.41k stars 382 forks source link

Having problem seeding a completed file. #40

Open waikontse opened 6 years ago

waikontse commented 6 years ago

Hi,

I'm trying to seed a file which has been downloaded successfully. The tracker registers that the client has the whole file, but when I try to download the file using another client, the client says the tracker has no seeders.

But when I switch the clients, the BT client does download from the seeder.

Any ideas?

Thanks

atomashpolskiy commented 6 years ago

@waikontse , was there any problem with the library, or just some misunderstanding?

waikontse commented 6 years ago

I'm not really sure, but I think there is a problem with the library. I haven't done an extensive testing to pinpoint where things go wrong or just a misunderstanding of the library.

And as alternative torrent client, I'm using transmission 2.9.2.

But here are 3 scenarios that I've tested and the result of those.

Scenario 1

Seeder: transmission client Leecher: bt client Result: bt client downloads the file

Scenario 2

Seeder: bt client Leecher: transmission client Result: transmissions receives 0 peers from tracker and no downloading happens.

Scenario 3

Seeder: bt client Leecher: bt client Result: bt client downloads the file.

Any ideas where things might have gone wrong are helpful. And as bt client config, I just copy/paste the sample code on your front page.

atomashpolskiy commented 6 years ago

Thank you for pointing out the different cases! I think I have an idea, will need to check.

vikulin commented 5 years ago

Any updates?

waikontse commented 5 years ago

I haven't work on the problem anymore, I've switched to another torrent library which I have to write a JNI wrapper for it.

phillui-37 commented 5 years ago

@atomashpolskiy sorry is there any update?

atomashpolskiy commented 5 years ago

Unfortunately, it's not clear from the OP, what might cause this issue. In general case, seeding works.

On Wed, 16 Jan 2019, 18:18 Phil Lui <notifications@github.com wrote:

@atomashpolskiy https://github.com/atomashpolskiy sorry is there any update?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atomashpolskiy/bt/issues/40#issuecomment-454816516, or mute the thread https://github.com/notifications/unsubscribe-auth/ADk0huAm9JayYoPNy6cnzS23gCV1yGhIks5vD0K3gaJpZM4QHTax .

phillui-37 commented 5 years ago

I have the same issue too. I don't know it's network issue or not(like UPnP or NAT). When I download content from a magnet link, it can upload some data... Arrrrr, around few MB for 3GB data. But when I stopped download client and try to upload file, it cannot find any peers at all

The download and upload code is basically following you example of file sharing (Leecher.java, Seeder.java)

atomashpolskiy commented 5 years ago

Right, torrent seeders don't look for leechers, it's the other way around. Seeders just "announce" to trackers and DHT, that they have something to upload. Or have I misunderstood you?

On Wed, 16 Jan 2019, 19:42 Phil Lui <notifications@github.com wrote:

I have the same issue too. I don't know it's network issue or not(like UPnP or NAT). When I download content from a magnet link, it can upload some data... Arrrrr, around few MB for 3GB data. But when I stopped download client and try to upload file, it cannot find any peers at all

The download and upload code is basically following you example of file sharing (Leecher.java, Seeder.java)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atomashpolskiy/bt/issues/40#issuecomment-454849862, or mute the thread https://github.com/notifications/unsubscribe-auth/ADk0htzUfC-3DjH1WNcTNCAmQos7A9mCks5vD1Z8gaJpZM4QHTax .

phillui-37 commented 5 years ago

No, you're right. The magnet link from the tracker has over 200 clients fetching the resources according to tracker records. It's nonsense that uploading keep 0 uploaded bytes for 2 hours.

atomashpolskiy commented 5 years ago

If it's a public torrent, then the majority of clients would be libtorrent/ztorrent/etc. based, and they might be biased with regards to less known clients (i.e. choose not to connect to such clients in presence of more preferable alternatives.) Just a wild guess, I honestly don't know. As I've said, seeding works (in Bt-only swarms usually, but I occasionally see the upload happening when downloading public torrents.) Reproducing and investigating problems in mixed swarms would require setting up infrastructure locally and looking at the things, and this is a significant effort, which I currently don't have the free time to undertake...

On Wed, 16 Jan 2019, 19:51 Phil Lui <notifications@github.com wrote:

No, you're right. The magnet link from the tracker has over 200 clients fetching the resources according to tracker records. It's nonsense that uploading keep 0 uploaded bytes for 2 hours.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atomashpolskiy/bt/issues/40#issuecomment-454853287, or mute the thread https://github.com/notifications/unsubscribe-auth/ADk0hspJioJi7GzLo4iQVkEAc2aa6Mxcks5vD1iYgaJpZM4QHTax .