Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

chat-with-rendezvous does not work #60

Open
zmajew opened this issue Apr 23, 2019 · 3 comments
Open

chat-with-rendezvous does not work #60

zmajew opened this issue Apr 23, 2019 · 3 comments

Comments

@zmajew
Copy link

zmajew commented Apr 23, 2019

Hello,
Thanks for go-libp2p!
I am learnig how to use go-libp2p and I need your help to resolve problem I have with chat-with-rendezvous example. Here is cli messages I have:

12:19:50.724 INFO rendezvous: Host created. We are: <peer.ID QmnkLm3D> chat.go:107
12:19:50.724 INFO rendezvous: [/p2p-circuit /ip4/127.0.0.1/tcp/6666] chat.go:108
12:19:50.728 WARNI dht: error bootstrapping: failed to find any peer in table dht_bootstrap.go:86
12:19:50.766 WARNI rendezvous: dial attempt failed: no good addresses chat.go:139
12:19:50.766 WARNI rendezvous: dial attempt failed: no good addresses chat.go:139
12:19:50.767 WARNI rendezvous: dial attempt failed: no good addresses chat.go:139
12:19:50.768 WARNI rendezvous: dial attempt failed: no good addresses chat.go:139
12:19:51.155 INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm
VQKNAd> [/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001]} chat.go:141
12:19:51.155 INFO rendezvous: Connection established with bootstrap node: {<peer.ID QmVQKNAd> [/ip4/178.62.158.247/tcp/4001]} chat.go:141
12:19:51.803 INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm
zaDs64> [/ip4/104.236.76.40/tcp/4001]} chat.go:141
12:19:51.803 INFO rendezvous: Connection established with bootstrap node: {<peer.ID QmzaDs64> [/ip6/2604:a880:800:10::4a:5001/tcp/4001]} chat.go:141
12:19:52.513 INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm
L1KrGM> [/ip4/104.236.179.241/tcp/4001]} chat.go:141
12:19:52.513 INFO rendezvous: Connection established with bootstrap node: {<peer.ID QmL1KrGM> [/ip6/2604:a880:1:20::203:d001/tcp/4001]} chat.go:141
12:19:53.334 INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm
wMKPnu> [/ip6/2400:6180:0:d0::151:6001/tcp/4001]} chat.go:141
12:19:53.334 INFO rendezvous: Connection established with bootstrap node: {<peer.ID QmwMKPnu> [/ip4/128.199.219.111/tcp/4001]} chat.go:141
12:20:00.180 INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm
QLuvuJ> [/ip4/104.131.131.82/tcp/4001]} chat.go:141
12:20:00.180 INFO rendezvous: Announcing ourselves... chat.go:149
12:20:00.594 WARNI rendezvous: Connection failed: dial attempt failed: no good addresses chat.go:172
12:20:00.598 WARNI rendezvous: Connection failed: dial attempt failed: no good addresses chat.go:172
12:20:00.600 WARNI rendezvous: Connection failed: dial attempt failed: no good addresses chat.go:172
12:20:00.602 WARNI rendezvous: Connection failed: dial attempt failed: no good addresses chat.go:172
12:20:00.602 WARNI rendezvous: Connection failed: dial attempt failed: no good addresses chat.go:172
12:20:00.603 WARNI rendezvous: Connection failed: dial attempt failed: no good addresses chat.go:172
12:24:50.729 WARNI dht: error bootstrapping: failed to find any peer in table dht_bootstrap.go:86
12:29:50.746 WARNI dht: error bootstrapping: failed to find any peer in table dht_bootstrap.go:86
12:34:50.762 WARNI dht: error bootstrapping: failed to find any peer in table dht_bootstrap.go:86

I tried to add bootstrep node from my IPFS node config file like:

$ ./chat -listen /ip4/127.0.0.1/tcp/6666 -peer /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ

but it does not helped.
What is the problem here?
Thanks

@tongxin97
Copy link

I just had the same issue. Seems like discovery.Advertise() failed.
Changing the RendezvousString also does not help.

@aschmidt75
Copy link

Had the same issue. Additionally, my output says "dht: Bad dht record"

14:07:14.039  INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm*wMKPnu> [/ip4/128.199.219.111/tcp/4001]} chat.go:141
14:07:14.039  INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm*wMKPnu> [/ip6/2400:6180:0:d0::151:6001/tcp/4001]} chat.go:141
14:07:43.141  INFO rendezvous: Connection established with bootstrap node: {<peer.ID Qm*QLuvuJ> [/ip4/104.131.131.82/tcp/4001]} chat.go:141
14:07:43.142  INFO rendezvous: Announcing ourselves... chat.go:149
14:08:22.286 WARNI net/identi: error reading identify message:  stream reset id.go:135
14:08:43.463 WARNI        dht: Bad dht record in PUT from: Qme9BMQX1rLaBRy8G3hQc9DuiB4vdP6KWz3mEFqmPqgWAd. invalid record keytype handlers.go:167

@upperwal
Copy link
Contributor

upperwal commented Apr 30, 2019

Most of them are WARNINGS and you should not worry about them.

Warning like 12:19:50.728 WARNI dht: error bootstrapping: failed to find any peer in table dht_bootstrap.go:86 is generated because of random walk algorithm which generates random peer ID's and try to connect to them even before we are connected to any node and hence no peer is available in the routing table.

Warnings like

12:19:50.768 WARNI rendezvous: dial attempt failed: no good addresses chat.go:139

I guess because of DNS multiaddr bootstrap nodes like /dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN which are not yet supported by the swarm. @Stebalien might be able tell you more about this.

Example should work regardless of the warnings generated. (Tried)

I think it would be good not to display too many logs to someone who is new.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants