Client randomly doesn't get a sole seed from the tracker
See original GitHub issueTracker and sole seeder are hosted on the server, both using monotorrent. The client receives a torrent file that uses this tracker and tries to start downloading it. Seemingly randomly the tracker will report 0 peers. The seed seems to always get at least 1 peer from the tracker (itself). Using an external application to download the torrent instead of monotorrent seems to always receive the peer properly. The download is forever stuck at 0 since there are no peers. Even waiting for a very long time doesn’t seem to do anything.
These are the only events being fired after starting the torrent when it fails (hash is pre-checked).
[09:54:46] ScrapeComplete Successful=True Tracker=http://.../announce
[09:54:46] AnnounceComplete Successful=True Tracker=http://.../announce PeersCount=0
[09:54:46] PeersFound ExistingPeers=0 NewPeers=0
This is what happens when it works properly:
[11:05:06] ScrapeComplete Successful=True Tracker=http://.../announce
[11:05:07] AnnounceComplete Successful=True Tracker=http://.../announce PeersCount=1
[11:05:07] PeersFound ExistingPeers=-1 NewPeers=2
[11:05:08] PeerConnected Peer=ipv4://.../
Looks like there’s a bunch of http/tracker exceptions being thrown when querying the tracker, but they seem to happen even if it succeedes.
Tested on latest master build on both client and server, but I believe it kept happening on latest beta build on nuget as well as the stable build.
This is pretty critical since I’m using private torrents so no DHT which would probably be able to sidestep the issue.
Edit: When there are multiple torrents running at the same time (all using that same tracker), it seems like some of them can succeed and some can fail to get the seed from the tracker.
Issue Analytics
- State:
- Created 8 months ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
Confirming the issue is fixed.
I wonder if this will shed some light on the problem: https://github.com/alanmcgovern/monotorrent/pull/620
If you don’t have logging enabled/redirected, you can redirect logging to a file by replacing
Console.Out
with a regular filestream/something and registering a function here. Note: You should do this right at the start of your app so everything initialises correctly.https://github.com/alanmcgovern/monotorrent/blob/master/src/Samples/SampleClient/StandardDownloader.cs#L35
I have moderate hope this will identify the issue you’re hitting 😃