bitcoin-cli hanging on RPC in an empty datadir #30181

issue carnhofdaki opened this issue on May 27, 2024
  1. carnhofdaki commented at 9:12 AM on May 27, 2024: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    bitcoin-cli is hanging indefinitely when called with stop in an empty datadir.

    Expected behaviour

    I would prefer it to exit with error like it does when the datadir directory is non-existent.

    $ rmdir empty
    $ bitcoin-cli -datadir=empty stop
    Error: Specified data directory "empty" does not exist.
    

    Steps to reproduce

    Simple shell example:

    $ mkdir empty
    $ bitcoin-cli -datadir=empty stop
    ^C
    $ time -p timeout 21 bitcoin-cli -datadir=empty help
    real 21.00
    user 0.00
    sys 0.01
    

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    Bitcoin Core version v27.99.0-06c2c713c52b (testnet4 PR build)

    Operating system and version

    Pop!_OS 22.04 LTS

    Machine specifications

    Linux x86_64, glibc

  2. carnhofdaki commented at 9:24 AM on May 27, 2024: contributor

    Closing. Seems it was my own local issue. Can not be reproduced with v27.0 release.

  3. carnhofdaki closed this on May 27, 2024

  4. bitcoin locked this on May 27, 2025
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-28 06:13 UTC

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