LND can’t connect with ZMQ #32258

issue bufo24 openend this issue on April 12, 2025
  1. bufo24 commented at 11:18 pm on April 12, 2025: contributor

    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: https://github.com/lightningnetwork/lnd/issues/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

    0Apr 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
    1Apr 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
    2Apr 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
    3Apr 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

  2. pinheadmz commented at 11:27 pm on April 12, 2025: member
    whats your bitcoin.conf and lnd.conf? does it work if you downgrade to bitcoin 28 or lnd 18?
  3. bufo24 commented at 11:34 pm on April 12, 2025: contributor

    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

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

    lnd:

    0bitcoind.zmqpubrawblock=tcp://192.168.178.109:28332
    1bitcoind.zmqpubrawtx=tcp://192.168.178.109:28333
    
  4. mzumsande commented at 4:25 am on April 13, 2025: contributor

    Compiled from source

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

  5. maflcko added the label RPC/REST/ZMQ on Apr 13, 2025
  6. maflcko added the label Questions and Help on Apr 13, 2025
  7. bufo24 commented at 10:45 am on April 13, 2025: contributor
    It works now, when compiling with -DWITH_ZMQ=ON. This wasn’t needed with the previous build system, was it?
  8. bufo24 commented at 10:50 am on April 13, 2025: contributor
    I read the draft release notes for v29.0 here. But did not read anything about this change. Maybe worth adding that in?
  9. pinheadmz commented at 11:04 am on April 13, 2025: member
  10. fanquake commented at 11:13 am on April 13, 2025: 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.
  11. maflcko removed the label Questions and Help on Apr 13, 2025
  12. maflcko added the label Needs release note on Apr 13, 2025
  13. maflcko added the label Docs on Apr 13, 2025
  14. maflcko removed the label RPC/REST/ZMQ on Apr 13, 2025
  15. maflcko added the label Build system on Apr 13, 2025
  16. mzumsande commented at 3:02 pm on April 13, 2025: 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.
  17. pinheadmz commented at 3:05 pm on April 13, 2025: member

    init error

    That’s a good point actually, I’m pretty sure rpc getzmqnotifications is “unknown command” when not compiled

  18. pinheadmz commented at 1:45 pm on April 14, 2025: member
    Apparently there is a historical reason to quietly ignore configurations that are known but not supported by the build: https://github.com/bitcoin/bitcoin/pull/13441
  19. glozow commented at 6:19 pm on April 14, 2025: member

    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: https://github.com/bitcoin-core/bitcoincore.org/pull/1119/ Lmk how that looks? Otherwise I think this issue can be marked resolved.

  20. bufo24 commented at 6:24 pm on April 14, 2025: contributor

    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.

  21. maflcko commented at 8:10 am on April 15, 2025: 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.

  22. maflcko removed the label Needs release note on Apr 15, 2025
  23. fanquake closed this on Apr 15, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-04-16 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me