libp2p / go-libp2p-examples

Example libp2p applications
MIT License
339 stars 145 forks source link

chat-with-rendezvous doesn't work: dht failed to query self during routing table refresh #194

Open Anquuni opened 3 years ago

Anquuni commented 3 years ago

I am using Windows 10. If I build the chat-with-rendezvous program and then type the following command in the console chat-with-rendezvous.exe -listen /ip4/127.0.0.1/tcp/6666

I get the error:

13:56:18.248  INFO rendezvous: [/ip4/127.0.0.1/tcp/6666] chat.go:110                                                          
13:56:18.249 WARNI        dht: 1 error occurred:                                                                                      
* failed to query self during routing table refresh: failed to find any peer in table                                                                                              
dht_bootstrap.go:86                                                                                                          
13:56:18.359 WARNI rendezvous: failed to dial : all dials failed                                                                
* [/ip4/147.75.83.83/tcp/4001] failed to negotiate security protocol: protocol not supported                                  
* [/ip6/2604:1380:2000:7a00::1/tcp/4001] failed to negotiate security protocol: protocol not supported chat.go:141          
13:56:18.578 WARNI rendezvous: failed to dial : all dials failed                                                                
* [/ip6/2604:1380:0:c100::1/tcp/4001] failed to negotiate security protocol: protocol not supported                           
* [/ip4/147.75.77.187/tcp/4001] failed to negotiate security protocol: protocol not supported chat.go:141                   
13:56:18.584 WARNI rendezvous: failed to dial : all dials failed                                                                
* [/ip4/104.131.131.82/tcp/4001] failed to negotiate security protocol: protocol not supported chat.go:141                  
13:56:18.623 WARNI rendezvous: failed to dial : all dials failed                                                                
* [/ip4/147.75.109.213/tcp/4001] failed to negotiate security protocol: protocol not supported                                
* [/ip6/2604:1380:1000:6000::1/tcp/4001] failed to negotiate security protocol: protocol not supported chat.go:141          
13:56:18.834 WARNI rendezvous: failed to dial : all dials failed                                                                
* [/ip6/2604:1380:3000:1f00::1/tcp/4001] failed to negotiate security protocol: protocol not supported                        
* [/ip4/147.75.94.115/tcp/4001] failed to negotiate security protocol: protocol not supported chat.go:141                   
13:56:18.839  INFO rendezvous: Announcing ourselves... chat.go:151                                                            
14:56:16.994 WARNI        dht: 1 error occurred:                                                                                      
* failed to query self during routing table refresh: failed to find any peer in table                                                                                                                                                                
dht_bootstrap.go:86                                                                                                          
15:56:16.993 WARNI        dht: 1 error occurred:                                                                                      
* failed to query self during routing table refresh: failed to find any peer in table                                                                                                                                                                
dht_bootstrap.go:86                                                                                                          
16:56:16.994 WARNI        dht: 1 error occurred:                                                                                      
* failed to query self during routing table refresh: failed to find any peer in table                                                                                                                                                                
dht_bootstrap.go:86                                                                                                          
17:56:16.993 WARNI        dht: 1 error occurred:                                                                                      
* failed to query self during routing table refresh: failed to find any peer in table                                                                                                                                                                
dht_bootstrap.go:86                                                                                                          
18:56:16.994 WARNI        dht: 1 error occurred:                                                                                      
* failed to query self during routing table refresh: failed to find any peer in table                                                                                                                                                                
dht_bootstrap.go:86

What is the reason for this? What do I have to do?

10d9e commented 3 years ago

I am seeing the same issue

visopsys commented 3 years ago

Same error here on Mac

visopsys commented 3 years ago

I figured out the problem. The peer string address is no longer /ip4/127.0.0.1/tcp/6666 but should be in the format /ip4/127.0.0.1/tcp/6666/p2p/16Uiu2HAkwhcg8mAaQemhtKh5hMUx5D1YhtzfrzSiVqNK48BhmTdw where you need to add the p2p suffix and the hash of the peer's identity.

The tutorial needs to update a bit.