-
Notifications
You must be signed in to change notification settings - Fork 2.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
Peers are unable to reconnect and stuck in a deadlock after IP address change #5377
Comments
Seems all we need to do here, is refresh the target peer IP/addr from the node announcement: https://github.com/lightningnetwork/lnd/blob/master/server.go#L3564 |
Is it necessary to only refresh peer advertised addresses here if the peer is an inbound peer? Why not for all peers? Also, is an itest a good idea for something like this? |
We do it for inbound peers there as since it's an inbound connection, we may not have the proper port they're actually listening on to connect to (we see the random port assigned by the kernel).
I think so, to ensure that things are working as expected end to end. A sample test would look something like:
|
Any chance for this issue to be resolved any time soon? I still have a handful of TOR peers that refuse to connect back to me even after almost 4 months. Since many nodes have IP address changes once in a while, I assume they have the same issue without ever noticing it. |
Note that there are related discussions at the spec level: lightning/bolts#911 |
As described by @t-bast in https://gitter.im/ACINQ/eclair LND and eclair (possibly c-lightning) peers are unable to reconnect after a IP address change due to not trusting
node_announcement
:This leads to a situation where even some clearnet peers have to be manually reconnected which can be quite time consuming and TOR peers are stuck in a deadlock that can only manually be resolved by the node operator of each and every TOR peer. They would have to look up the new IP address of their offline peer on one of the lightning explorer websites and manually feed it to their node. This is unlikely to happen quickly, if at all.
I changed the IP of my node more than 2 days ago and still have 65 disconnected TOR peers. Most, if not all of them seem to be running LND.
I'd suggest to use the IP from
node_announcement
if a connection to the last known IP fails. Can still be alternated with last known IP until success.Also reported to eclair: ACINQ/eclair#1842
The text was updated successfully, but these errors were encountered: