Peers are unable to reconnect and stuck in a deadlock after IP address change
See original GitHub issueIssue Description
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
:
if you change your IP address, your peers won’t reconnect to you. They’ll wait for you to connect to them and then will store your new IP address for future reconnections (ie they don’t trust the new IP address from
node_announcement
alone)
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 LND: https://github.com/lightningnetwork/lnd/issues/5377
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
@pm47 I’d be curious to have your input on this as it impacts the (re)connection logic. It feels like we could be smarter when reconnecting, and try the address from the latest
node_announcement
if the last address we know doesn’t work.This should be fixed by #2123, feel free to reopen if it isn’t.