Skip to content

LND can't connect with ZMQ #32258

Closed
Closed

Description

@bufo24

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

Bitcoin core v29.0 is running all good, but LND can't connect to the ZMQ endpoints anymore, issue created in LND here:
lightningnetwork/lnd#9706

Expected behaviour

LND should connect correctly to the ZMQ endpoints from bitcoin core v29.0, like they do with v28.1

Steps to reproduce

Run LND v0.19.0rc2 together with Bitcoin core v29.0

Relevant log output

Apr 12 23:02:53 lnd-mainnet lnd[3373367]: 2025-04-12 23:02:53.276 [INF] RPCC: Established connection to RPC server 192.168.178.109:8332
Apr 12 23:02:53 lnd-mainnet lnd[3373367]: 2025-04-12 23:02:53.276 [INF] RPCC: Established connection to RPC server 192.168.178.109:8332
Apr 12 23:02:53 lnd-mainnet lnd[3373367]: 2025-04-12 23:02:53.278 [ERR] LTND: unable to create partial chain control: unable to subscribe for zmq block events: dial tcp 192.168.178.109:28332: connect: connection refused
Apr 12 23:02:53 lnd-mainnet lnd[3373367]: 2025-04-12 23:02:53.278 [ERR] LTND: Shutting down due to error in main method rev=0053fd err="unable to create partial chain control: unable to subscribe for zmq block events: dial tcp 192.168.178.109:28332: connect: connection refused"

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

v29.0

Operating system and version

Debian 11

Machine specifications

No response

Activity

  1. pinheadmz commented on Apr 12, 2025

    @pinheadmz
    Member

    whats your bitcoin.conf and lnd.conf? does it work if you downgrade to bitcoin 28 or lnd 18?

  2. bufo24 commented on Apr 12, 2025

    @bufo24
    ContributorAuthor

    It works when I downgrade bitcoin core to 28.1, unfortunately LND 0.19 has db migrations and cannot downgrade to 0.18.x, so cannot test that.

    I guess this is all that's related:
    bitcoin core

    zmqpubrawblock=tcp://0.0.0.0:28332
    zmqpubrawtx=tcp://0.0.0.0:28333
    

    lnd:

    bitcoind.zmqpubrawblock=tcp://192.168.178.109:28332
    bitcoind.zmqpubrawtx=tcp://192.168.178.109:28333
    
  3. mzumsande commented on Apr 13, 2025

    @mzumsande
    Contributor

    Compiled from source

    just to make sure, did you compile bitcoin core with -DWITH_ZMQ=ON (doc)?

  4. bufo24 commented on Apr 13, 2025

    @bufo24
    ContributorAuthor

    It works now, when compiling with -DWITH_ZMQ=ON. This wasn't needed with the previous build system, was it?

  5. bufo24 commented on Apr 13, 2025

    @bufo24
    ContributorAuthor

    I read the draft release notes for v29.0 here. But did not read anything about this change. Maybe worth adding that in?

  6. fanquake commented on Apr 13, 2025

    @fanquake
    Member

    I think the point is that pretty much everything optional is now opt in, when, previously it would be compiled in based on a dependency being available. The release notes don't seem to mention this at all.

  7. mzumsande commented on Apr 13, 2025

    @mzumsande
    Contributor

    Also, zmq-related startup options such as zmqpubhashblock could throw an init error (or at least a warning) if zmq wasn't compiled in, instead of silently being ignored.

  8. pinheadmz commented on Apr 13, 2025

    @pinheadmz
    Member

    init error

    That's a good point actually, I'm pretty sure rpc getzmqnotifications is "unknown command" when not compiled

  9. pinheadmz commented on Apr 14, 2025

    @pinheadmz
    Member

    Apparently there is a historical reason to quietly ignore configurations that are known but not supported by the build: #13441

  10. glozow commented on Apr 14, 2025

    @glozow
    Contributor

    It works now, when compiling with -DWITH_ZMQ=ON. This wasn't needed with the previous build system, was it?

    Indeed, it's confusing that configure defaults changed. I added a couple sentences to the website release notes: bitcoin-core/bitcoincore.org#1119 Lmk how that looks? Otherwise I think this issue can be marked resolved.

  11. bufo24 commented on Apr 14, 2025

    @bufo24
    ContributorAuthor

    I added a couple sentences to the website release notes

    Nice! This should already help!
    I will make a PR to make it more prominent in the build docs as well.

  12. maflcko commented on Apr 15, 2025

    @maflcko
    Member

    I've also modified https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Autotools-to-CMake-Options-Mapping#autotools-to-cmake-options-mapping to include:

    The CMake variables have fixed default values and are not auto-detected at runtime. Any CMake build that requires values different from the defaults must explicitly set them. CMake will print a configure summary, which can be used to verify the build configuration.

  13. added a commit that references this issue on Jul 29, 2025
  14. added a commit that references this issue on Jun 28, 2026
  15. added a commit that references this issue on Jun 30, 2026
  16. locked and limited conversation to collaborators on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions