首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >适用于java的BT客户端-找不到对等项

适用于java的BT客户端-找不到对等项
EN

Stack Overflow用户
提问于 2021-01-01 18:50:06
回答 1查看 83关注 0票数 0

我正在运行一个来自https://atomashpolskiy.github.io/bt/的BT java实现的例子,可以在这里找到:

代码语言:javascript
复制
<dependency>
   <groupId>com.github.atomashpolskiy</groupId>
   <artifactId>examples</artifactId>
   <version>1.9</version>
</dependency>

项目源代码:

代码语言:javascript
复制
Config config = new Config() {
            @Override
            public int getNumOfHashingThreads() {
                return Runtime.getRuntime().availableProcessors() * 2;
            }

            @Override
            public int getAcceptorPort() {
                return 6991;
            }
        };

        Module dhtModule = new DHTModule(new DHTConfig() {
            @Override
            public Collection<InetPeerAddress> getBootstrapNodes() {
                return Collections.singleton(new InetPeerAddress(config.getAcceptorAddress().getHostAddress(), Seeder.PORT));
            }
        });

        Path targetDirectory = Paths.get(System.getProperty("user.home"), "Downloads");

        // create file system based backend for torrent data
        Storage storage = new FileSystemStorage(targetDirectory);

        BtClient client = Bt.client()
                .config(config)
                .storage(storage)
                .magnet("magnet:?xt=urn:btih:20268DA0BA1C7E62F3DAC269A4F579156C754841&dn=The.Boys.S02E02.Proper.Preparation.and.Planning.1080p.AMZN.WEBRip.DDP5.1.x264-NTb&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2980%2Fannounce&tr=udp%3A%2F%2F9.rarbg.to%3A2920%2Fannounce&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce")
                .autoLoadModules()
                .module(dhtModule)
                .stopWhenDownloaded()
                .build();
        System.err.println("Starting leecher...");
        long t0 = System.currentTimeMillis();
        client.startAsync(state -> {
            System.err.println("Peers: " + state.getConnectedPeers().size() + "; Downloaded: " + (((double)state.getPiecesComplete()) / state.getPiecesTotal()) * 100 + "%");
        }, 1000).join();
        System.err.println("Done in " + Duration.ofMillis(System.currentTimeMillis() - t0));

我正在用一个有50多个节点的磁铁来尝试它,但是当我运行这个例子时,它根本找不到任何节点。我已经按照存储库问题中的建议安装了JCE。不走运。问题出在哪里?

启动时的当前输出:

代码语言:javascript
复制
2021-01-01 11:32:18,329 [INFO] bt.runtime.BtRuntimeBuilder Loading standard extension module bt.peerexchange.PeerExchangeModule
2021-01-01 11:32:18,331 [INFO] bt.runtime.BtRuntimeBuilder Loading standard extension module bt.peer.lan.LocalServiceDiscoveryModule
2021-01-01 11:32:18,332 [INFO] bt.runtime.BtRuntimeBuilder Overriding auto-loaded module bt.dht.DHTModule
2021-01-01 11:32:18,333 [INFO] bt.runtime.BtRuntimeBuilder Auto-loading module bt.tracker.http.HttpTrackerModule with default configuration
2021-01-01 11:32:19,108 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/charsets.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,111 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,112 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/deploy.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,112 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,113 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/javaws.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,113 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,113 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/jce.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,169 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,169 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/jfr.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,170 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,170 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/jfxswt.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,171 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,171 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/jsse.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,171 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,171 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/management-agent.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,171 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,172 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/plugin.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,172 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,172 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/resources.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,174 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,174 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/rt.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,176 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,177 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/security/local_policy.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,196 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,196 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/usr/lib/jvm/jdk1.8.0_271/jre/lib/security/US_export_policy.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,204 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: null
2021-01-01 11:32:19,204 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/home/misko/.m2/repository/com/github/atomashpolskiy/examples/1.9/examples-1.9.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,205 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: com.github.atomashpolskiy.examples
2021-01-01 11:32:19,205 [DEBUG] bt.service.ClasspathApplicationService Processing manifest file: jar:file:/home/misko/.m2/repository/com/github/atomashpolskiy/bt-core/1.9/bt-core-1.9.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,206 [DEBUG] bt.service.ClasspathApplicationService Bundle-SymbolicName: com.github.atomashpolskiy.bt-core
2021-01-01 11:32:19,206 [DEBUG] bt.service.ClasspathApplicationService Will read version from manifest file: jar:file:/home/misko/.m2/repository/com/github/atomashpolskiy/bt-core/1.9/bt-core-1.9.jar!/META-INF/MANIFEST.MF
2021-01-01 11:32:19,206 [DEBUG] bt.service.ClasspathApplicationService Bt version 1.9
2021-01-01 11:32:19,359 [INFO] bt.net.portmapping.impl.PortMappingInitializer Mapping application's acceptor port on startup.
Starting leecher...
2021-01-01 11:32:19,478 [DEBUG] bt.runtime.BtRuntime Running startup hook: Schedule periodic cleanup of PEX messages
2021-01-01 11:32:19,479 [DEBUG] bt.runtime.BtRuntime Running startup hook: Initialize DHT facilities
2021-01-01 11:32:19,483 [DEBUG] bt.runtime.BtRuntime Running startup hook: Initialize message receiver
2021-01-01 11:32:19,484 [DEBUG] bt.runtime.BtRuntime Running startup hook: Schedule periodic cleanup of stale peer connections
2021-01-01 11:32:19,484 [DEBUG] bt.runtime.BtRuntime Running startup hook: Initialize message dispatcher
2021-01-01 11:32:19,491 [DEBUG] bt.runtime.BtRuntime Running startup hook: Initialize incoming connection acceptors
2021-01-01 11:32:19,495 [DEBUG] bt.runtime.BtRuntime Running startup hook: Schedule periodic peer lookup
2021-01-01 11:32:19,498 [DEBUG] bt.dht.MldhtService <INFO> Starting DHT on port 49001
2021-01-01 11:32:19,499 [DEBUG] bt.runtime.BtRuntime Running startup hook: bt.net.portmapping.impl.PortMappingInitializer$$Lambda$96/294111720@51acdf2e
2021-01-01 11:32:19,500 [INFO] bt.net.SocketChannelConnectionAcceptor Opening server channel for incoming connections @ /192.168.0.155:6991
2021-01-01 11:32:19,522 [DEBUG] bt.dht.MldhtService Filtering addresses to bind DHT server to.. Checking /0.0.0.0.. Could use: false
2021-01-01 11:32:19,522 [DEBUG] bt.dht.MldhtService Filtering addresses to bind DHT server to.. Checking /192.168.0.155.. Could use: true
2021-01-01 11:32:19,522 [DEBUG] bt.dht.MldhtService Filtering addresses to bind DHT server to.. Checking /127.0.0.1.. Could use: false
2021-01-01 11:32:19,522 [DEBUG] bt.dht.MldhtService <INFO> updating set of valid bind addresses
 old: []
 new: [/192.168.0.155]
2021-01-01 11:32:19,551 [DEBUG] bt.dht.MldhtService <INFO> selecting default route bind/192.168.0.155
2021-01-01 11:32:19,568 [DEBUG] bt.dht.MldhtService <INFO> Starting RPC Server /192.168.0.155 0323FF9CAFDD293365BDBF29C8BE691D8D5EB4C3
2021-01-01 11:32:19,603 [DEBUG] bt.processor.ChainProcessor Processing next stage: torrent ID (20268da0ba1c7e62f3dac269a4f579156c754841), stage (bt.processor.torrent.CreateSessionStage)
2021-01-01 11:32:19,609 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiling messaging agent type: bt.peerexchange.PeerExchangePeerSourceFactory
2021-01-01 11:32:19,692 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled consumer method {consumedType=bt.protocol.extended.ExtendedHandshake}: consume
2021-01-01 11:32:19,693 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled consumer method {consumedType=bt.peerexchange.PeerExchange}: consume
2021-01-01 11:32:19,693 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled producer method: produce
2021-01-01 11:32:19,693 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled 3 consumer/producer methods
2021-01-01 11:32:19,712 [DEBUG] bt.processor.ChainProcessor Finished processing stage: torrent ID (20268da0ba1c7e62f3dac269a4f579156c754841), stage (bt.processor.torrent.CreateSessionStage)
2021-01-01 11:32:19,712 [DEBUG] bt.processor.ChainProcessor Processing next stage: torrent ID (20268da0ba1c7e62f3dac269a4f579156c754841), stage (bt.processor.magnet.FetchMetadataStage)
2021-01-01 11:32:19,714 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiling messaging agent type: bt.torrent.messaging.MetadataConsumer
2021-01-01 11:32:19,714 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled consumer method {consumedType=bt.magnet.UtMetadata}: consume
2021-01-01 11:32:19,714 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled consumer method {consumedType=bt.protocol.extended.ExtendedHandshake}: consume
2021-01-01 11:32:19,714 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled producer method: produce
2021-01-01 11:32:19,714 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled 3 consumer/producer methods
2021-01-01 11:32:19,715 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiling messaging agent type: bt.torrent.messaging.BitfieldCollectingConsumer
2021-01-01 11:32:19,715 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled consumer method {consumedType=bt.protocol.Have}: consume
2021-01-01 11:32:19,715 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled consumer method {consumedType=bt.protocol.Bitfield}: consume
2021-01-01 11:32:19,715 [DEBUG] bt.torrent.compiler.MessagingAgentCompiler Compiled 2 consumer/producer methods
Peers: 0; Downloaded: 0.0%
Peers: 0; Downloaded: 0.0%
Peers: 0; Downloaded: 0.0%
Peers: 0; Downloaded: 0.0%
Peers: 0; Downloaded: 0.0%
2021-01-01 11:32:24,514 [DEBUG] bt.tracker.udp.UdpTracker Executing tracker UDP request of type QUERY: AnnounceRequest{id=-1508983094, torrentId=20268da0ba1c7e62f3dac269a4f579156c754841, peerId=2d4274010900002da0872cd927746781f7284767, downloaded=0, left=0, uploaded=0, eventType=QUERY(0), listeningPort=6991, requestString=/announce}
2021-01-01 11:32:24,514 [DEBUG] bt.tracker.udp.UdpTracker Executing tracker UDP request of type QUERY: AnnounceRequest{id=-1507828847, torrentId=20268da0ba1c7e62f3dac269a4f579156c754841, peerId=2d4274010900002da0872cd927746781f7284767, downloaded=0, left=0, uploaded=0, eventType=QUERY(0), listeningPort=6991, requestString=/announce}
2021-01-01 11:32:24,517 [DEBUG] bt.tracker.udp.UdpMessageWorker Creating UDP socket {localAddress=/192.168.0.155:0}
2021-01-01 11:32:24,517 [DEBUG] bt.tracker.udp.UdpMessageWorker Creating UDP socket {localAddress=/192.168.0.155:0}
2021-01-01 11:32:24,518 [DEBUG] bt.tracker.udp.UdpMessageWorker Connecting UDP socket {localAddress=/192.168.0.155:0, remoteAddress=tracker.zer0day.to/69.16.230.42:1337}
2021-01-01 11:32:24,518 [DEBUG] bt.tracker.udp.UdpMessageWorker Connecting UDP socket {localAddress=/192.168.0.155:0, remoteAddress=tracker.leechers-paradise.org/31.131.4.62:6969}
2021-01-01 11:32:24,660 [DEBUG] bt.tracker.udp.UdpTracker Executing tracker UDP request of type QUERY: AnnounceRequest{id=-1454733499, torrentId=20268da0ba1c7e62f3dac269a4f579156c754841, peerId=2d4274010900002da0872cd927746781f7284767, downloaded=0, left=0, uploaded=0, eventType=QUERY(0), listeningPort=6991, requestString=/announce}
2021-01-01 11:32:24,661 [DEBUG] bt.tracker.udp.UdpMessageWorker Creating UDP socket {localAddress=/192.168.0.155:0}
2021-01-01 11:32:24,661 [DEBUG] bt.tracker.udp.UdpMessageWorker Connecting UDP socket {localAddress=/192.168.0.155:0, remoteAddress=coppersurfer.tk/31.14.40.31:6969}
2021-01-01 11:32:24,664 [DEBUG] bt.tracker.udp.UdpTracker Executing tracker UDP request of type QUERY: AnnounceRequest{id=-1456272495, torrentId=20268da0ba1c7e62f3dac269a4f579156c754841, peerId=2d4274010900002da0872cd927746781f7284767, downloaded=0, left=0, uploaded=0, eventType=QUERY(0), listeningPort=6991, requestString=/announce}
2021-01-01 11:32:24,666 [DEBUG] bt.tracker.udp.UdpMessageWorker Creating UDP socket {localAddress=/192.168.0.155:0}
2021-01-01 11:32:24,666 [DEBUG] bt.tracker.udp.UdpMessageWorker Connecting UDP socket {localAddress=/192.168.0.155:0, remoteAddress=9.rarbg.me/151.80.120.115:2980}
2021-01-01 11:32:24,669 [DEBUG] bt.tracker.udp.UdpTracker Executing tracker UDP request of type QUERY: AnnounceRequest{id=-1457811490, torrentId=20268da0ba1c7e62f3dac269a4f579156c754841, peerId=2d4274010900002da0872cd927746781f7284767, downloaded=0, left=0, uploaded=0, eventType=QUERY(0), listeningPort=6991, requestString=/announce}
2021-01-01 11:32:24,669 [DEBUG] bt.tracker.udp.UdpMessageWorker Creating UDP socket {localAddress=/192.168.0.155:0}
2021-01-01 11:32:24,669 [DEBUG] bt.tracker.udp.UdpMessageWorker Connecting UDP socket {localAddress=/192.168.0.155:0, remoteAddress=9.rarbg.to/151.80.120.113:2920}
2021-01-01 11:32:24,940 [DEBUG] bt.tracker.http.HttpTracker Executing tracker HTTP request of type QUERY; request URL: http://tracker.trackerfix.com:80/announce?info_hash=%20%26%8D%A0%BA%1C~b%F3%DA%C2i%A4%F5y%15luHA&peer_id=-Bt%01%09%00%00-%A0%87%2C%D9%27tg%81%F7%28Gg&ip=192.168.0.155&port=6991&uploaded=0&downloaded=0&left=0&compact=1&numwant=50&supportcrypto=1

稍后会出现错误(我认为这是由于跟踪器链接断开造成的):

代码语言:javascript
复制
2021-01-01 11:32:44,500 [WARN] bt.peer.ScheduledPeerSource Peer collection finished with exception in peer source: TrackerPeerSource {UdpTracker{trackerUrl=http://tracker.zer0day.to:1337/announce}}
java.util.concurrent.ExecutionException: bt.BtException: Failed to get peers for torrent
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_271]
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_271]
    at bt.peer.ScheduledPeerSource.schedulePeerCollection(ScheduledPeerSource.java:72) ~[bt-core-1.9.jar:1.9]
    at bt.peer.ScheduledPeerSource.update(ScheduledPeerSource.java:60) ~[bt-core-1.9.jar:1.9]
    at bt.peer.PeerRegistry.queryPeerSource(PeerRegistry.java:188) ~[bt-core-1.9.jar:1.9]
    at bt.peer.PeerRegistry.queryTracker(PeerRegistry.java:166) ~[bt-core-1.9.jar:1.9]
    at bt.peer.PeerRegistry.lambda$queryTrackers$5(PeerRegistry.java:154) ~[bt-core-1.9.jar:1.9]
    at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_271]
    at bt.peer.PeerRegistry.queryTrackers(PeerRegistry.java:152) ~[bt-core-1.9.jar:1.9]
    at bt.peer.PeerRegistry.lambda$collectAndVisitPeers$3(PeerRegistry.java:132) ~[bt-core-1.9.jar:1.9]
    at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649) ~[?:1.8.0_271]
    at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1082) ~[?:1.8.0_271]
    at bt.peer.PeerRegistry.collectAndVisitPeers(PeerRegistry.java:105) ~[bt-core-1.9.jar:1.9]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_271]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_271]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_271]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_271]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_271]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_271]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]
Caused by: bt.BtException: Failed to get peers for torrent
    at bt.peer.TrackerPeerSource.collectPeers(TrackerPeerSource.java:62) ~[bt-core-1.9.jar:1.9]
    at bt.peer.ScheduledPeerSource.lambda$schedulePeerCollection$0(ScheduledPeerSource.java:81) ~[bt-core-1.9.jar:1.9]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_271]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_271]
    ... 3 more
Caused by: bt.BtException: Failed to receive response from the tracker
    at bt.tracker.udp.UdpMessageWorker.sendMessage(UdpMessageWorker.java:101) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.sendMessage(UdpMessageWorker.java:103) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.createSession(UdpMessageWorker.java:88) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.getSession(UdpMessageWorker.java:82) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.sendMessage(UdpMessageWorker.java:77) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpTracker$1.announceEvent(UdpTracker.java:142) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpTracker$1.query(UdpTracker.java:122) ~[bt-core-1.9.jar:1.9]
    at bt.peer.TrackerPeerSource.collectPeers(TrackerPeerSource.java:54) ~[bt-core-1.9.jar:1.9]
    at bt.peer.ScheduledPeerSource.lambda$schedulePeerCollection$0(ScheduledPeerSource.java:81) ~[bt-core-1.9.jar:1.9]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_271]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_271]
    ... 3 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1784) ~[?:1.8.0_271]
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1928) ~[?:1.8.0_271]
    at bt.tracker.udp.UdpMessageWorker.sendMessage(UdpMessageWorker.java:96) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.sendMessage(UdpMessageWorker.java:103) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.createSession(UdpMessageWorker.java:88) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.getSession(UdpMessageWorker.java:82) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpMessageWorker.sendMessage(UdpMessageWorker.java:77) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpTracker$1.announceEvent(UdpTracker.java:142) ~[bt-core-1.9.jar:1.9]
    at bt.tracker.udp.UdpTracker$1.query(UdpTracker.java:122) ~[bt-core-1.9.jar:1.9]
    at bt.peer.TrackerPeerSource.collectPeers(TrackerPeerSource.java:54) ~[bt-core-1.9.jar:1.9]
    at bt.peer.ScheduledPeerSource.lambda$schedulePeerCollection$0(ScheduledPeerSource.java:81) ~[bt-core-1.9.jar:1.9]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_271]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_271]
    ... 3 more
EN

回答 1

Stack Overflow用户

发布于 2021-01-03 01:49:52

它并没有说这是一个错误,只是一个警告。给定多个对等源(跟踪器+分布式哈希表),即使其中一个源不能运行,客户端也应该继续工作。你要么需要一个更简单的测试用例,要么你必须更深入地挖掘并弄清楚每个对等源的状态。

根据日志时间戳,您只等待了几秒钟。如果对等源实际上正在工作,并且提供了一些IP地址,那么客户端也可能只是需要更多的时间来尝试所有这些地址来查找可访问的联系人。

您还可以尝试使用wireshark来跟踪网络级别上发生的情况。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65529028

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档