3

Question

How can I check to see if ZeroMQ is not active due to a config error or due to lack of support at compile time?

Details

I'm seeing a lot of messages like this from the insight logs:

[2017-12-12T12:21:31.695Z] warn: ZMQ connection delay: tcp://127.0.0.1:28332

When I test to see if the port is open and listening with netstat -peanut or netcat -v localhost 28332 I can see that it is not (even though it's in bitcoind.conf).

bitcoind.conf

server=1
whitelist=0.0.0.0/0
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubrawtxlock=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcuser=user321
rpcpassword=local321
rpcport=9998
rpcallowip=0.0.0.0/0
uacomment=bitcore
#debug=1
#testnet=1

bitcore-node.json:

    {
        "network": "mainnet",
        "port": 3001,
        "services": [
            "bitcoind",
            "insight-api-dash",
            "insight-ui-dash",
            "web"
        ],
        "servicesConfig": {
            "bitcoind": {
                "connect": [{
                    "rpchost": "127.0.0.1",
                    "rpcport": 9998,
                    "rpcuser": "user321",
                    "rpcpassword": "local321",
                    "zmqpubrawtx": "tcp://127.0.0.1:28332"
                }]
            }
        }
    }

I'm pretty sure I compiled with zmq support, but since it's not actually listening I'm guessing that it's possible that I did not (i.e. although libzmq was present perhaps it was not in the right path to be detected).

How can I check to see if it's a config error or a compile error?

5

You should have a file named config.log in your Bitcoin Core working directory. Look in the file for ZMQ related lines. If ZMQ is enabled, you should see things like #define ENABLE_ZMQ 1. If it is not enabled, you should see things like #define ENABLE_ZMQ 0.

4

As this question is related to executable compilation which has to do with linking (static or dynamic), therefore the ultimate way to know if your compiled bitcoind executable has been compiled with 0mq support is simply:

ldd /usr/bin/bitcoind | grep -i mq

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.