mpetazzoni / ttorrent

BitTorrent Java library with tracker and download client
http://mpetazzoni.github.com/ttorrent/
Apache License 2.0
1.38k stars 502 forks source link

Problem with donwloading file. #72

Closed akhomy closed 7 years ago

akhomy commented 10 years ago

Hi. I test your torrent java application on ubuntu 12.04 and in vm windows 7. I install xbt on ubuntu, create torrent file from utorrent in windows 7 and start seeding. For download I used those part of code: InetAddress tmp=InetAddress.getByName("192.168.0.20"); Client client = new Client( // This is the interface the client will listen on (you might need something // else than localhost here). tmp, // Load the torrent from the torrent file and use the given // output directory. Partials downloads are automatically recovered. SharedTorrent.fromFile( new File("/home/android/Desktop/elki3_trailer_HD.zip.torrent"), new File("/home/android/")));
client.download();
In "/home/android/" folder part file created.

When I used a Transmission torrent client all work all, in utorrent I see peer and download start, with your app not. Please help me fix this problem.

mpetazzoni commented 10 years ago

Can you paste the log output of ttorrent? Without seeing what it does, and without having access to your torrent file, I can't tell what's going wrong. Thanks!

akhomy commented 10 years ago

Building Java BitTorrent library 1.2

[resources:resources] [debug] execute contextualize Using 'UTF-8' encoding to copy filtered resources. Copying 1 resource

[compiler:compile] Compiling 1 source file to /home/android/NetBeansProjects/AndroSync/AndrosNettyStudy/avaible look likes projects/ttorrent-ttorrent-1.2/build/classes

[exec:exec] log4j: reset attribute= "false". log4j: Threshold ="null". log4j: Level value for root is [INFO]. log4j: root level set to INFO log4j: Class name: [org.apache.log4j.ConsoleAppender] log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" log4j: Setting property [conversionPattern] to [%d{dd MMM yyyy HH:mm:ss} %5p %c{1} - %m%n]. log4j: Adding appender named [consoleAppender] to category [root]. log4j: Class name: [org.apache.log4j.RollingFileAppender] log4j: Setting property [append] to [false]. log4j: Setting property [file] to [out/learning.log]. log4j: Parsing layout of class: "org.apache.log4j.PatternLayout" log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %-5p [%c{1}] %m%n]. log4j: setFile called: out/learning.log, false log4j: setFile ended log4j: Adding appender named [fileAppender] to category [root]. 13 Nov 2013 23:12:22 INFO Torrent - Single-file torrent information: 13 Nov 2013 23:12:22 INFO Torrent - Torrent name: elki3_trailer_HD.zip 13 Nov 2013 23:12:22 INFO Torrent - Announced at: 13 Nov 2013 23:12:22 INFO Torrent - 1. udp://192.168.0.20:2710 13 Nov 2013 23:12:22 INFO Torrent - Created on..: Tue Nov 12 20:34:08 EET 2013 13 Nov 2013 23:12:22 INFO Torrent - Created by..: uTorrent/3310 13 Nov 2013 23:12:22 INFO Torrent - Pieces......: 974 piece(s) (262144 byte(s)/piece) 13 Nov 2013 23:12:22 INFO Torrent - Total size..: 255,199,601 byte(s) 13 Nov 2013 23:12:22 INFO FileStorage - Initialized byte storage file at /home/android/elki3_trailer_HD.zip.part (0+255199601 byte(s)). 13 Nov 2013 23:12:22 INFO FileCollectionStorage - Initialized torrent byte storage on 1 file(s) (255199601 total byte(s)). 13 Nov 2013 23:12:22 INFO ConnectionHandler - Listening for incoming connections on /192.168.0.20:6881. 13 Nov 2013 23:12:22 INFO Announce - Initialized announce sub-system with 1 trackers on elki3_trailer_HD.zip. 13 Nov 2013 23:12:22 INFO Client - BitTorrent client [..616538] for elki3_trailer_HD.zip started and listening at 192.168.0.20:6881... 13 Nov 2013 23:12:22 INFO SharedTorrent - Analyzing local data for elki3_trailer_HD.zip with 4 threads (974 pieces)... 13 Nov 2013 23:12:22 INFO SharedTorrent - ... 10% complete 13 Nov 2013 23:12:22 INFO SharedTorrent - ... 20% complete 13 Nov 2013 23:12:23 INFO SharedTorrent - ... 30% complete 13 Nov 2013 23:12:23 INFO SharedTorrent - ... 40% complete 13 Nov 2013 23:12:23 INFO SharedTorrent - ... 50% complete 13 Nov 2013 23:12:23 INFO SharedTorrent - ... 60% complete 13 Nov 2013 23:12:23 INFO SharedTorrent - ... 70% complete 13 Nov 2013 23:12:23 INFO SharedTorrent - ... 80% complete 13 Nov 2013 23:12:24 INFO SharedTorrent - ... 90% complete 13 Nov 2013 23:12:24 INFO Announce - Starting announce loop... 13 Nov 2013 23:12:24 INFO UDPTrackerClient - Announcing STARTED to tracker with 0U/0D/255199601L bytes... 13 Nov 2013 23:12:24 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:25 INFO Announce - Setting announce interval to 1800s per tracker request. 13 Nov 2013 23:12:27 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:30 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:33 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:36 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:39 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:42 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:45 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:48 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:51 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:54 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:12:57 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:13:00 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. 13 Nov 2013 23:13:03 INFO Client - SHARING 0/974 pieces (0.00%) [0/0] with 0/0 peers at 0.00/0.00 kB/s. elki3_trailer_hd zip torrent

akhomy commented 10 years ago

Load picture it's a torrent with png exension.

mpetazzoni commented 10 years ago

Are there any other peers exchanging on that same torrent? It looks like ttorrent doesn't get any peers back from the tracker. Do you control the tracker?

akhomy commented 10 years ago

Yes, is a seeder peer( not good know terminology) that start seeding. I control xbt tracker. As I describe preview the Other torrent client work normal, can we disscuss in real time?Skype, google chat etc?

mpetazzoni commented 10 years ago

I don't do real-time support unless I get paid :-) (joking). More seriously, can you confirm if I understand the scenario correctly? From what I can gather, you have:

Do you have logs from the tracker also? Can you check if the tracker is correctly "seeing" both peers (the seeder and the ttorrent peer that's trying to download)? Because from what I see here, the ttorrent client isn't getting any peers back from the tracker. Can you also turn on debug logging by putting the following into a logj4.properties file in the classpath?

log4j.rootLogger=DEBUG, stdout

Thanks!