bitcoind + testnet on same machine fails when zmq is active #12481

issue Alex-CodeLab opened this issue on February 19, 2018
  1. Alex-CodeLab commented at 10:27 AM on February 19, 2018: none

    <!-- Describe the issue -->

    Trying to run bitcoind node and a testnet node on the same machine, but starting testnet fails when zmq is active

    $ bitcoind  -testnet
    bitcoind: zmq/zmqpublishnotifier.cpp:104: virtual void CZMQAbstractPublishNotifier::Shutdown(): Assertion `psocket' failed.
    Aborted (core dumped)
    

    When zmqnotifications is configured only on mainnet, the testnet fails to start (even when zmq is disabled or configured with different port on testnet).

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    0.16rc4

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    ubuntu 16.04

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. MarcoFalke added the label RPC/REST/ZMQ on Feb 19, 2018
  3. promag commented at 4:20 PM on February 20, 2018: member

    Can you post the configuration and debug.log?

  4. Alex-CodeLab commented at 10:46 PM on February 20, 2018: none

    testnet3/debug.log

    2018-02-21 08:27:33 Bitcoin Core version v0.16.0rc4 (release build)
    2018-02-21 08:27:33 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
    2018-02-21 08:27:33 Assuming ancestors of block 0000000002e9e7b00e1f6dc5123a04aad68dd0f0968d8c7aa45f6640795c37b1 have valid signatures.
    2018-02-21 08:27:33 Setting nMinimumChainWork=00000000000000000000000000000000000000000000002830dab7f76dbb7d63
    2018-02-21 08:27:33 Using the 'standard' SHA256 implementation
    2018-02-21 08:27:33 Default data directory /home/user/.bitcoin
    2018-02-21 08:27:33 Using data directory /home/user/.bitcoin/testnet3
    2018-02-21 08:27:33 Using config file /home/user/.bitcoin/bitcoin.conf
    2018-02-21 08:27:33 Using at most 125 automatic connections (1024 file descriptors available)
    2018-02-21 08:27:33 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
    2018-02-21 08:27:33 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
    2018-02-21 08:27:33 Using 2 threads for script verification
    2018-02-21 08:27:33 scheduler thread start
    2018-02-21 08:27:33 Binding RPC on address 0.0.0.0 port 18332 failed.
    2018-02-21 08:27:33 HTTP: creating work queue of depth 16
    2018-02-21 08:27:33 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
    2018-02-21 08:27:33 HTTP: starting 4 worker threads
    2018-02-21 08:27:33 Using wallet directory /home/user/.bitcoin/testnet3
    2018-02-21 08:27:33 init message: Verifying wallet(s)...
    2018-02-21 08:27:33 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2018-02-21 08:27:33 Using wallet wallet.dat
    2018-02-21 08:27:33 CDBEnv::Open: LogDir=/home/user/.bitcoin/testnet3/database ErrorFile=/home/user/.bitcoin/testnet3/db.log
    

    testnet3/bitcoin.conf

    listen=1
    rpcport=8444
    testnet=1
    checkblocks=50
    #zmqpubrawtx=tcp://127.0.0.1:28441
    #zmqpubhashtx=tcp://127.0.0.1:28442
    #zmqpubhashblock=tcp://127.0.0.1:28443
    #zmqpubrawblock=tcp://127.0.0.1:28444
    #zmqpubrawtx=tcp://127.0.0.1:28445
    
    

    [update].. ok, I noticed it does not automatically look for a bitcoin.conf file in the testnet3/ folder, so it reads the regular conf. I guess it works as expected, and I have to add the location of the testnet conf using the -conf= option

  5. Alex-CodeLab closed this on Feb 21, 2018

  6. MarcoFalke locked this on Sep 8, 2021
Contributors

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: 2026-04-13 15:15 UTC

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