-
Notifications
You must be signed in to change notification settings - Fork 146
chat-with-rendezvous connection error #70
Comments
@lbordino (the friend) |
@bigs Any suggestion? |
@BaldEagleX02 Are either of you behind NAT? If so, you won't be able to get a connection between the two of you. I'd recommend passing in an explicit listen address, enabling port-forwarding in your router, and trying again. Keep in mind that DHT-based discovery can take some time to kick in. You'll know you've successfully found each other when you see a print message from this line. |
I modified the log level to debug and then I saw that we discovered each other (after the program printed "Searching for peers..." I saw "Found another peer" or something similar). |
It works with UPnP (A client behind NAT and B client with static IP and UPnP). |
Given the configuration of that specific example, you'll have to set the listen option to reflect your public IP and an accessible port. Another approach would be to enable port mapping via the NATPortMap option in the call to Edit: To clarify, since your libp2p node doesn't know that it's publicly dialable, it won't publish any addresses to the rendezvous point. |
Yeah, in fact this example works very well with UPnP enabled (router and program) but if I am behind NAT (e.g. a mobile connection) I don't know any accessible port. I have to use hole punching to know at least one and I was wondering if it will be implemented in this library. Obviously it would require a server. Take a look at this example: https://github.com/wilfreddenton/udp-hole-punching Thank you for your support! |
Hi,
I fired up a simple-bootstrap-node on a server of mine.
Then a friend of mine in another city and I compiled chat-with-rendezvous as described and ran it (./chat -peer <string/from/bootstrap/node> -rendezvous testing).
Our consoles connect successfully to the bootstrap-node and print "Announcing ourselves" and then we get either nothing (literally nothing) or some warnings (they find each other but can't connect).
The text was updated successfully, but these errors were encountered: