perlin-network / noise

A decentralized P2P networking stack written in Go.
https://godoc.org/github.com/perlin-network/noise
MIT License
1.78k stars 213 forks source link

Branch cleanup, chat example Dail error #263

Closed Leadrive closed 4 years ago

Leadrive commented 4 years ago

I download the branch cleanup, run the chat example in internet server, the server have public internet ip, such as 202.96.1.1:3000

and run another node in my local pc. chat 202.96.1.1:3000 take a error:

panic: connection could not be identified: failed to ping peer: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: authentication handshake failed: connected to peer with addr 202.96.1.1:3000, but their id writes addr 127.0.0.1:3000"

If I run the branch origin/master chat example, it will work ok.

Leadrive commented 4 years ago

In the intranet, no a same PC, also have this error.

Leadrive commented 4 years ago

When I turn on the grpc log(using environment variable GRPC_GO_LOG_VERBOSITY_LEVEL=99 GRPC_GO_LOG_SEVERITY_LEVEL=info),the detail information is:

Listening for peers on port: 34327
INFO: 2020/01/07 23:31:37 parsed scheme: ""
INFO: 2020/01/07 23:31:37 scheme "" not registered, fallback to default scheme
INFO: 2020/01/07 23:31:37 ccResolverWrapper: sending update to cc: {[{202.96.1.1:3000  <nil> 0 <nil>}] <nil> <nil>}
INFO: 2020/01/07 23:31:37 ClientConn switching balancer to "pick_first"
INFO: 2020/01/07 23:31:37 blockingPicker: the picked transport is not ready, loop back to repick
INFO: 2020/01/07 23:31:37 pickfirstBalancer: HandleSubConnStateChange: 0xc000126150, {CONNECTING <nil>}
WARNING: 2020/01/07 23:31:37 grpc: addrConn.createTransport failed to connect to {202.96.1.1:3000  <nil> 0 <nil>}. Err :connection error: desc = "transport: authentication handshake failed: connected to peer with addr 202.96.1.1:3000, but their id writes addr 127.0.0.1:3000". Reconnecting...
INFO: 2020/01/07 23:31:37 pickfirstBalancer: HandleSubConnStateChange: 0xc000126150, {TRANSIENT_FAILURE connection error: desc = "transport: authentication handshake failed: connected to peer with addr 202.96.1.1:3000, but their id writes addr 127.0.0.1:3000"}
panic: 2.connection could not be identified: failed to ping peer: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: connected to peer with addr 202.96.1.1:3000, but their id writes addr 127.0.0.1:3000"
iwasaki-kenta commented 4 years ago

Closing in lieu of #266. There is no longer a hard dependency on grpc and protobuf.