-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Libp2p does not recover from interface being temporally down #374
Comments
I don't think this is due to the backoff logic, probably something else.
|
Hello. Is there a solution for the issue? I got the same.
|
peer A creates a stream that initializes a connection to peer B. peer A's network interface connects to a new wifi network (goes out of range of the one it was in and then hops to another). the connection / stream doesn't work. not completely unexpected. but when it hops back to the previous wifi network and gets the same assigned IP address, the connection / stream doesn't resume. not entire sure about the design objectives here, but this is kindof a show-stopper for P2P iOT. |
how can i at least just check the status of the connection? Conn.Stat doesn't seem to do it. |
That's not something we can fix (without stream migration, see libp2p/specs#328). When peer B switches networks, all of its connections get cut by the OS. The problem is that peer A won't see this till it hits a timeout. |
But to answer your last question, you can use the ping protocol (search
for "ping" in the main libp2p repo) to quickly check. But you'll still
have to wait some timeout before you can really declare the connection "dead".
|
I know this is an old issue, but I just verified that this no longer happens. |
Our storage cluster suffers from time to time from some issues where libp2p hosts do
dial_backoff
forever after a problem with the listen interface. It starts with:Libp2p does not recover from this event. It shows:
From there,
dial attempt failed
anddial backoffs
keep continuously happening until the peers are restarted, well after the network interface is back up. After re-starting the peers, everything works well again.This are standard libp2p basic hosts, from
5.0.17
. The services they run will continuously attempt to re-open streams in such failures.Ideally, libp2p should be able to recover from such events automatically, but I'm not sure how difficult this is or why exactly it stays erroring.
The text was updated successfully, but these errors were encountered: