OutboundFailure (DialFailure) while trying to start a request-response #5708
Unanswered
depechec0de
asked this question in
Q&A
Replies: 1 comment
-
The way I usually handle it is by having a behaviour to act as an address book to store peers and their [known] addresses and when dialing it would pull from that behaviour using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
All the peers in the network are symmetrical, running in
kad::Mode::Server
mode, and with the following behavior:I start a node
B
with a known connection address,A
andC
dialB
and connect successfully.Then I make
A
do aswarm.behaviour_mut().transfer_request.send_request(&peer_id, TransferRequest(amount));
toB
whereA
knows thePublicKey
/PeerId
ofC
.This results in
Behaviour(QAATBehaviourEvent: OutboundFailure { peer: PeerId("12D3KooWBWmQAVRRNtesp44rdm771o24qfNGzXuvHspE2AHsYtX2"), request_id: OutboundRequestId(1), error: DialFailure })
.In my swarm loop, I am just printing the events that I receive, i.e., I do not call to any function like
kad::Behaviour::add_address
.If I add an
add_address
call when I handle aSwarmEvent::ConnectionEstablished
, I see thatA
andC
connect to each other, but that happens after the request-response, so the failure persists.Questions
A
does not learnC
's address and dial successfully?kad::Behaviour::add_address
uponSwarmEvent::ConnectionEstablished
.Log
I replaced the actual public keys with
A
,B
, andC
and highlighted the error.Beta Was this translation helpful? Give feedback.
All reactions