the8472 / mldht

Bittorrent Mainline DHT implementation in java
Mozilla Public License 2.0
147 stars 45 forks source link

No network interfaces eligible for DHT sockets found during startup. #35

Closed ghost closed 2 years ago

ghost commented 2 years ago

Change LogLevel to: Info Starting DHT on port 10005 updating set of valid bind addresses old: [] new: [/172.26.41.114, /127.0.0.1, /0.0.0.0] No network interfaces eligible for DHT sockets found during startup. Address family: IPV4_DHT multihoming [requires public IP addresses if enabled]: true Public IP addresses: Default route: /172.26.41.114 lbms.plugins.mldht.kad.DHTException: failed to start any tasks (no active servers?) at lbms.plugins.mldht.kad.TaskBuilder.sampleInfoHashes(TaskBuilder.java:99) at the8472.mldht.indexing.TorrentDumper.sampling(TorrentDumper.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)

ghost commented 2 years ago

`<?xml version="1.0" encoding="UTF-8"?>

Info 10005 true true true 6 the8472.mldht.PassiveRedisIndexer
127.0.0.1
the8472.mldht.cli.Server the8472.mldht.indexing.TorrentDumper
`
ghost commented 2 years ago

Why is the default route private IP

the8472 commented 2 years ago

It sounds like you're behind a NAT? Check the list of IP addresses of your machine

multihoming [requires public IP addresses if enabled]: true

As the message and the documentation says, if your machine does not have a public address you need to disable multi-homing

ghost commented 2 years ago

I have configured NAT port mapping and disabled multihoming and modify RPCServerManager code

RPCServer current = interfacesInUse.values().stream().findAny().orElse(null); InetAddress defaultBind = null;//Optional.ofNullable(AddressUtils.getDefaultRoute(addressType)).filter(addressFilter).orElse(null); try { defaultBind = InetAddress.getByName("0.0.0.0"); } catch (UnknownHostException e) { throw new RuntimeException(e); }

Change LogLevel to: Info Starting DHT on port 10005 updating set of valid bind addresses old: [] new: [/172.26.41.114, /127.0.0.1, /0.0.0.0] selecting default route bind/0.0.0.0 Starting RPC Server /0.0.0.0 17330D4211294377CA162B2D13A62E0C6CA56C0D

the8472 commented 2 years ago

and modify RPCServerManager code

This shouldn't be necessary, once you have disabled multi-homing it should already pick the default route even if it is a local address.

Since it's not selecting an address to create a server the issue is solved?

ghost commented 2 years ago

The problem is solved