From a849484c4d512118ceaa806b17e4a36d85f1c70d Mon Sep 17 00:00:00 2001 From: Andrew Barnes Date: Mon, 9 Mar 2026 13:13:05 -0400 Subject: [PATCH 1/3] chainreg: clarify zmq port mismatch warning message The existing warning "unable to subscribe to zmq block/tx events" is misleading because it implies lnd failed to create zmq connections, when it actually means the configured port doesn't match what bitcoind reports via getzmqnotifications. This is expected in port-forwarding setups. Reword the warning to clearly state it's a port mismatch and suggest verifying the configuration. Fixes lightningnetwork/lnd#10568 --- chainreg/chainregistry.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/chainreg/chainregistry.go b/chainreg/chainregistry.go index 71e9c04a6c4..f3be82c2ffd 100644 --- a/chainreg/chainregistry.go +++ b/chainreg/chainregistry.go @@ -478,8 +478,11 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) { } if url.Port() != zmqPubRawBlockURL.Port() { log.Warnf( - "unable to subscribe to zmq block events on "+ - "%s (bitcoind is running on %s)", + "zmq block event port mismatch: "+ + "lnd is configured for %s but "+ + "bitcoind reports %s -- ensure "+ + "the ports match or are forwarded "+ + "correctly", zmqPubRawBlockURL.Host, url.Host, ) @@ -493,8 +496,11 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) { } if url.Port() != zmqPubRawTxURL.Port() { log.Warnf( - "unable to subscribe to zmq tx events on "+ - "%s (bitcoind is running on %s)", + "zmq tx event port mismatch: "+ + "lnd is configured for %s but "+ + "bitcoind reports %s -- ensure "+ + "the ports match or are forwarded "+ + "correctly", zmqPubRawTxURL.Host, url.Host, ) From 5b1b7b3a657b24715e5a67d7fc65192f4fe8934f Mon Sep 17 00:00:00 2001 From: Andrew Barnes Date: Mon, 9 Mar 2026 14:25:24 -0400 Subject: [PATCH 2/3] Compact zmq port mismatch warning log messages Combine multi-line format strings into fewer lines for readability. --- chainreg/chainregistry.go | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/chainreg/chainregistry.go b/chainreg/chainregistry.go index f3be82c2ffd..e1a978af78c 100644 --- a/chainreg/chainregistry.go +++ b/chainreg/chainregistry.go @@ -477,15 +477,10 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) { return nil, nil, err } if url.Port() != zmqPubRawBlockURL.Port() { - log.Warnf( - "zmq block event port mismatch: "+ - "lnd is configured for %s but "+ - "bitcoind reports %s -- ensure "+ - "the ports match or are forwarded "+ - "correctly", - zmqPubRawBlockURL.Host, - url.Host, - ) + log.Warnf("zmq block event port mismatch: "+ + "lnd configured for %s, bitcoind reports %s -- "+ + "ensure ports match or are forwarded correctly", + zmqPubRawBlockURL.Host, url.Host) } pubRawBlockActive = true } @@ -495,15 +490,10 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) { return nil, nil, err } if url.Port() != zmqPubRawTxURL.Port() { - log.Warnf( - "zmq tx event port mismatch: "+ - "lnd is configured for %s but "+ - "bitcoind reports %s -- ensure "+ - "the ports match or are forwarded "+ - "correctly", - zmqPubRawTxURL.Host, - url.Host, - ) + log.Warnf("zmq tx event port mismatch: "+ + "lnd configured for %s, bitcoind reports %s -- "+ + "ensure ports match or are forwarded correctly", + zmqPubRawTxURL.Host, url.Host) } pubRawTxActive = true } From c5a4f94e3a61bad4dede3eeef90f29d40325875c Mon Sep 17 00:00:00 2001 From: Bortlesboat Date: Mon, 23 Mar 2026 14:59:29 -0400 Subject: [PATCH 3/3] chainreg: apply formatting feedback to zmq warning messages --- chainreg/chainregistry.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chainreg/chainregistry.go b/chainreg/chainregistry.go index e1a978af78c..a0e69b5d6bd 100644 --- a/chainreg/chainregistry.go +++ b/chainreg/chainregistry.go @@ -478,8 +478,9 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) { } if url.Port() != zmqPubRawBlockURL.Port() { log.Warnf("zmq block event port mismatch: "+ - "lnd configured for %s, bitcoind reports %s -- "+ - "ensure ports match or are forwarded correctly", + "lnd is configured for %s but "+ + "bitcoind reports %s -- ensure the "+ + "ports match or are forwarded correctly", zmqPubRawBlockURL.Host, url.Host) } pubRawBlockActive = true @@ -491,8 +492,9 @@ func NewPartialChainControl(cfg *Config) (*PartialChainControl, func(), error) { } if url.Port() != zmqPubRawTxURL.Port() { log.Warnf("zmq tx event port mismatch: "+ - "lnd configured for %s, bitcoind reports %s -- "+ - "ensure ports match or are forwarded correctly", + "lnd is configured for %s but "+ + "bitcoind reports %s -- ensure the "+ + "ports match or are forwarded correctly", zmqPubRawTxURL.Host, url.Host) } pubRawTxActive = true