2

I created two bitcoind service in my server. First using default configuration, and second use new configuration. I am able to stop first bitcoind using bitcoin-cli stop, but the second bitcoind still running. How to safely stop the second bitcoind without forcing to kill it ?

  • 2
    Not an answer, but a SIGTERM or SiGINT will cause a graceful shutdown of bitcoind. – Pieter Wuille May 7 '18 at 4:18
0

bitcoin-cli accepts a -conf parameter. Use that to point to the config of the second bitcoind client (which would contain the rpc details), and then shut it down as normal.

You can also use -rpcpassword, -rpcport, and -rpcuser to supply the details manually.

0

bitcoin-cli has a -datadir option so you can specify the data directory of your other bitcoind instance. It will use that parameter to read the bitcoin.conf and .cookie files in the other data directory so that it can connect to the other bitcoind instance. With that parameter, you can send RPC commands to it, including the stop command.

Alternatively, you can stop bitcoind by finding its PID (using ps) and the kill command. kill be default uses SIGTERM so bitcoind will actually safely shutdown by going through its shutdown process.

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.