Open alabianca opened 4 years ago
I ran into this issue a while ago and root-caused it to changes in the kad DHT package sometime after v0.5.0. The default mode of DHTs used to be "server", now the default is just a client (they can query, but not respond). The fix was to add the dht.Mode(dht.ModeServer)
option as a parameter when calling dht.New()
.
@t-lin thanks, that solved our issue as well! the examples / documentation need to be updated!
Hi, Thanks for all the examples. They help a lot. I am running into an issue where I am trying to run the
chat-with-rendezvous
examples on 2 machines. Both machines connect to the bootstrap peers just fine and both advertise themeet me here
rendezvous string. However, when usingFindPeers
I get back 0 peers. The example only works if i run both peers on the same machine or on the same network.Some friends and I are trying to learn more about libp2p by building a dummy app that advertises file hashes via
discovery.Advertise
and find them usingdiscovery.FindPeers
. However, we run into the above issue as we sit behind NATs. Once we do have the peer ID we know how to connect to each other usingcircuit-relay
. Its just a matter of discovering the peer that advertises the hash which blocks us at the moment.