GithubHelp home page GithubHelp logo

Comments (4)

atomashpolskiy avatar atomashpolskiy commented on July 19, 2024

Hi @Raudius ! Thanks for sharing! Yeah, it does seem like the tracker itself is not responding. Considering that bt.tracker.MultiTracker is involved in the stack, there should be an announce-list property in the torrent file. Bt should try announcing to all trackers in this list. Is this the only tracker-related exception in out.log?

from bt.

Raudius avatar Raudius commented on July 19, 2024

OK so I just realised that HTTP trackers don't work with this library (as they havent been implemented yet(?)). I was able to get those to work through ttorrent.

But with when starting the client I also get this line of output:

1124 [bt.net.pool.incoming-acceptor] INFO bt.net.PeerConnectionPool - Opening server channel for incoming connections @ /192.168.1.40:6891

Which sugggests that it is listening only for connections locally? Shouldnt that be my public address instead?

Then after that line and after the tracker connection times out I get the error in the first post, and it repeats it after each timeout preceded by the error:

151120 [bt.peer.peer-collector] ERROR bt.peer.PeerRegistry - Error when querying peer source: bt.peer.TrackerPeerSource@2456c2b9

from bt.

atomashpolskiy avatar atomashpolskiy commented on July 19, 2024

HTTP trackers are supported, but for the sake of keeping the core with minimum number of 3-rd party dependencies it's shipped as a separate module.

Include this in your pom.xml:

<dependency>
    <groupId>com.github.atomashpolskiy</groupId>
    <artifactId>bt-core</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.github.atomashpolskiy</groupId>
    <artifactId>bt-http-tracker-client</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Then create your client in the following way:

BtRuntime runtime = BtRuntime.builder().module(new HttpTrackerModule()).build();

Or

BtRuntime runtime = BtRuntime.builder().module(new HttpTrackerModule()).module(new PeerExchangeModule()).build();

if you also want to make use of peer exchange.

You might also want to look through the brief explanation of basic concepts, it should help build a better picture of the main API:
http://atomashpolskiy.github.io/bt/intro/

from bt.

atomashpolskiy avatar atomashpolskiy commented on July 19, 2024

But with when starting the client I also get this line of output:
1124 [bt.net.pool.incoming-acceptor] INFO bt.net.PeerConnectionPool - Opening server channel for incoming connections @ /192.168.1.40:6891
Which sugggests that it is listening only for connections locally? Shouldnt that be my public address instead?

Nope, it's listening on a local port. Peers will be able to contact you via your external address, which will be communicated to them by the tracker, that you are working with.

If you'd like to listen on a different interface/port, use Config [1]:

Config config = new Config();
config.setAcceptorAddress(/* network address */);
config.setAcceptorPort(/* network port */);
// tweak other parameters

BtRuntime runtime = BtRuntime.builder(config).build();

[1] http://atomashpolskiy.github.io/bt/javadoc/latest/bt/runtime/Config.html

from bt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.