nitmir / btdht

A python implementation of the Bittorrent DHT (Distributed Hash Table)
GNU General Public License v3.0
85 stars 30 forks source link

Error during boostraping #16

Open MortySecurity opened 3 years ago

MortySecurity commented 3 years ago
def search_dht(dht, info_hash):
    peers = []
    for i in range(0, 5):
        peers = dht.get_peers(binascii.a2b_hex(info_hash))
        time.sleep(1.5)

    return peers

if __name__ == '__main__':
    dht = btdht.DHT()
    dht.start()  # now wait at least 15s for the dht to boostrap
    print("Initializing DHT", flush=True)
    time.sleep(20)
    print(search_dht(dht, '756D9FA81E9328A97A03EE134EBCA8C2CCE3B670'))

The output I get is

init socket for b'0c66c99cafff75350028b3ec10845835c75921b5'
Initializing DHT
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
Bootstraping
0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s
None

I can't really find what "0 nodes, 0 goods, 0 bads | in: 0, out: 3 en 1s" mean in the documentation. Why would I be getting this "error" and not the expected (IP, PORT) outcome?

caryoscelus commented 11 months ago

i'm also getting this error and later on No msg since more than 2 minutes on udp port 12345. and after that i get is_alive() returning False