ZMQ Options Error #15808

issue in3rsha openend this issue on April 12, 2019
  1. in3rsha commented at 4:13 pm on April 12, 2019: contributor

    I am trying to enable ZMQ by adding the following options to my bitcoin.conf:

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

    However, when I start bitcoind with these options I get the following error:

    0bitcoind: zmq/zmqpublishnotifier.cpp:104: virtual void CZMQAbstractPublishNotifier::Shutdown(): Assertion `psocket' failed.
    

    For what it’s worth, this only seems to happen when I have both zmqpubrawblock and zmqpubrawtx enabled as options, but individually they work fine. For example:

    0bitcoind --testnet -zmqpubrawblock=tcp://127.0.0.1:28332 # this works
    1bitcoind --testnet -zmqpubrawtx=tcp://127.0.0.1:28333 # this works
    2bitcoind --testnet -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28333 # error
    

    I’ve been following the guide at https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md, but it doesn’t seem to explain why this is happening.

    What could be causing this error? Thanks in advance for any advice.


    EDIT: I tried to recreate this error on a different computer and the config works without error. I believe there may be an issue with the bitcoin.conf on the other computer. I will compare the two bitcoin.conf files to see if I can spot what may be causing this error.

    Nonetheless, I’d still be very interested in understanding what this particular error message indicates.

    EDIT 2: I believe this error may be caused due to multiple ZMQs using the same port at the same time (e.g. running bitcoind and bitcoind -testnet at the same time, and both are using the same bitcoin.conf with the same ZMQ ports set).

    Will check the ports on the other computer with ss -lntp to see if they’re in use.

  2. fanquake added the label RPC/REST/ZMQ on Apr 12, 2019
  3. benthecarman commented at 6:16 pm on April 13, 2019: contributor
    You can’t have mainnet and a testnet node using the same zmq port. You can use network specific options to differentiate the two.
  4. in3rsha closed this on Apr 20, 2019

  5. MarcoFalke locked this on Dec 16, 2021

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-12-02 21:13 UTC

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