`addpeer` not working
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- networking
Research direction
Start with the addpeer startup handling and the server log path that removes the connection request, then compare that flow with the successful lncli connect path. Check how the peer address is stored and surfaced by getnodeinfo; the issue gives no file or test names, so locate relevant tests before changing code. Done means peers behind NAT reconnect to the specified IPs after restart without adding private IPs to announcements.
Written by the indexing model from the issue text.
Description
I'm running v0.21.5-beta on mainnet.
I have several nodes running a private network with channels between them. The nodes have connection to the internet, but are behind NAT and have no ports forwarded.
I've recently changed some of their IP addresses as part of a network restructuring.
I try to use addpeer to specify the peer IP addresses on startup to the correct new IP addresses, but this does not work, the peers don't connect and I get inactive channels.
In the log I see
2026-10-28 15:28:49.628 [INF] SRVR: Removing conn req: [REDACTED]
for the peer that was added via addpeer.
Also, getnodeinfo just shows "addresses": [] for the peer.
If I use lncli connect after starting, I can connect to the peer and the channels become active, but I don't want to have to do that after each restart (see also https://github.com/lightningnetwork/lnd/issues/10870). I also done want to add my private network IP addresses to my node announcement messages.
- Dominant language
- Go
- Stars
- 8.2k
- Forks
- 2.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 103
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lightningnetwork/lnd
-
funding: failure logs print `<nil>` error and zero channel IDPossibly taken @litbot-9000 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
lightningnetwork/lnd#11676 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 85/100
lightningnetwork/lnd#11674 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lightningnetwork/lnd#11672 ·
Maintainers usually reply within 1 day
-
test flake
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
lightningnetwork/lnd#11663 · 1 comment ·
Maintainers usually reply within 1 day
-
[flake]: lnwallet/test/bitcoind.TestLightningWalletBitcoindRPCPolling/spend_unconfirmed_outputsOpentest flake
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lightningnetwork/lnd#11642 · 1 comment ·
Maintainers usually reply within 1 day
All issues in lightningnetwork/lnd
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
containers/gvisor-tap-vsock#796 ·
Maintainers usually reply within 2 days
-
external needs:triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
celestiaorg/celestia-node#5448 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsPossibly taken @huanghaoyuanhhy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zilliztech/milvus-backup#1418 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
projectdiscovery/nuclei#8423 ·
Maintainers usually reply within 1 day