-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dialing client raised Connection closed with error NoAddresses
, relay server log is no protocol could be agreed upon for inbound stream
#4007
Comments
Version: client.rs is copy from https://github.com/libp2p/rust-libp2p/blob/master/examples/dcutr/src/main.rs relay.rs add a line under the let mut swarm = SwarmBuilder::without_executor(transport, behaviour, local_peer_id).build();
// need add specific external address for client connect correct
// https://github.com/libp2p/rust-libp2p/issues/2621#issuecomment-1127963348
swarm.add_external_address(
"/ip4/114.132.71.142/tcp/4001/p2p/12D3KooWDpJ7As7BWAwRMfu1VU2WCqNjvq387JEYKDBj4kx6nXTN"
.parse()
.unwrap(),
); |
relay server is on a machine has a public IP114.132.71.142 |
maybe something happened when InboundUpgrade, if print the |
Connection closed with error NoAddresses
, relay server log is no protocol could be agreed upon for inbound stream
Connection closed with error NoAddresses
, relay server log is no protocol could be agreed upon for inbound streamConnection closed with error NoAddresses
, relay server log is no protocol could be agreed upon for inbound stream
Thanks for the detailed report. Mind testing again now that #3982 is merged? |
Thanks for your help. I tried with the newest commit The debug log But the dailing client still failed with error relay server debug logs
dailing client debug logs
listening client debug logs
|
These code lines are generated from the protobuf definition (hence they are in the I did recently test the hole punching setup for QUIC and it worked (albeit not on the first try but hole punches aren't guaranteed to succeed). Can you confirm that your relay is always running? Can you try to restart the dialer and listener example several times but leave the relay running? |
Thanks for help. I tried to leave the relay running, and restart the listener and dialer for above ten times, but every time the error info is the same. I also tried to use root privilege. relay log
dialer log
listener log
|
What commands are you using to run the dialer and listener? |
relay at 114.132.71.142
listener
dialer
|
listener/dialer build from |
Drive-by suggestion, are you testing with #4052 @gongzhengyang? |
Dialer and listener are running on different machines, yes? |
yeah, I always pull the latest master branch, recompile again and test the code, I hope maybe something changed could fix my problem. Yesterday I use the master branch with git commit 8776fa8. |
I tried dialer and listener always on different machines, both in a same network behind nat and in different network. |
That is rather odd. I am working on automated tests for hole punching at the moment so we can hopefully resolve this soon. |
Summary
I started by the docs in
libp2p/src/tutorials/hole_punching.rs
.The relay and listening client can connect successful, but the dialing client couldn't.
When dailing client try to dial, the relay server always has a debug level log is
no protocol could be agreed upon for inbound stream
, and return a bytes[8, 100]
to dailing client, which meansCONNECT
(referrust-libp2p/protocols/dcutr/src/generated/holepunch/pb.rs
) for dailing client.Dialing client error
libp2p_swarm] Connection closed with error Handler(Left(Right(Left(Apply(Left(NoAddresses))))))
.Expected behaviour
The listening client initiating a direct connection upgrade for the new relayed connection.
Actual behaviour
Dailing client raised an error
Connection closed with error Handler(Left(Right(Left(Apply(Left(NoAddresses))))))
, and the connection between Dailing client and relay server broken.Relay Debug Output
Listening Client Debug Output
Dailing Debug Output
Possible Solution
Version
libp2p-v0.51.3
, still failed.Would you like to work on fixing this bug?
Yes
The text was updated successfully, but these errors were encountered: