views:

588

answers:

2

I am writing a library to download files via bittorrent. There will be no user intervention. The user is to be blissfully unaware that files are even being downloaded. I've chosen BitTorrent as the preferred method of transferring the files, and built the application around the MonoTorrent library. On my server I am running the bttrack python script for tracking purposes, and rTorrent for seeding.

I have successfully downloaded 1078 files onto client machines. There are however 2 files that do not get beyond 8 and 11 percent respectively. When I use uTorrent, BitTorrent and even the MonoTorrent GUI, the files download without any problems.

The downloads work fine on all clients except my own. It does not matter which clients I use to seed. There is nothing unusual about either the filesizes or the filenames:

72 359 940b - a05276e5193644d48aaf711242b40a30.ssz

74 448 896b - e5ba856c6115453091d8b82ae53749bd.ssz

The first file downloads to 7.58% (5.30MB) on my client. The second file to 11.42% (8.30MB).

On the rTorrent (when seeding from rTorrent) screen, it initially shows the status as r/ci/un (connection initiated remotely/remote client choking local client, interested in downloading/ local client unchoked remote client, not interested in uploading)

When the torrents reach their deadlocks, the status changes to r/cn/cn (connection initiated remotely/remote choking local, uninterested in downloading/local client choking remote, uninterested in uploading)

The transfer stops there, and no matter what I've done, I cannot get it to go any further.

I am using MonoTorrent version 0.70.0.0, SVN Revision 134304.

Since the clients are all on expensive GSM connections, I set the torrents with 0 upload slots. But even in testing, allocating slots for upload did not resolve the problem.

How can I get these clients to be friends and not choke each other anymore?

EDIT: I have also tried the sample client which is in the monotorrent svn. It also only downloads the files up to the points mentioned above. The MonoTorrentGUI which is built on an older version of MonoTorrent (version 0.2.0.0), downloads the files, but even when I try to use that binary, it does not download via my application.

A: 

Could you be a little more explicit as to what exactly is going on. Which clients are seeding, which ones are downloading, and which combination is it that results in those two files not being downloadable. Also which combination is it that does work?

i.e. rtorrent seeding, monotorrent/utorrent downloading - fails

monotorrent seeding, rtorrent/monotorrent/utorrent downloading - works

Also, is there anything special about those two particular files? Are they of zero length? Are they an exact multiple of 2 in size? Special characters in their filenames maybe?
+2  A: 

The problem here turned out to be a bug in the monotorrent library. It has been fixed in the interim. There is a thread on the author's forum with details.

http://monotorrent.21.forumer.com/viewtopic.php?t=325&highlight=

Thanks for fixing this Alan :)

RichieACC