Skip to content

ZMQ Options Error #15808

@in3rsha

Description

@in3rsha

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

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

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

bitcoind: 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:

bitcoind --testnet -zmqpubrawblock=tcp://127.0.0.1:28332 # this works
bitcoind --testnet -zmqpubrawtx=tcp://127.0.0.1:28333 # this works
bitcoind --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.

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