Description: On Elementary OS Loki 0.4.1 I've downloaded and installed bitcoind as per the official guide from bitcoin.org .
However, I in my case I don't have enough space on my internal SSD to store the whole blockchain, so I want to download it and maintain it on an external hooked up HDD.
When I run the bitcoind -daemon -datadir=path_to_external_hdd_folder the Bitcoin server starts up successfully and starts downloading the blockchain to that specified folder (In the logs I can see the height is growing and so is the size of the selected datadir which I passed in as an argument) ..
Note: My bitcoin.conf file is empty.
Expected behavior:
Expecting for bitcoin-cli to look for the .cookie file withing the pointed -datadir .
Occuring behavior:
My problem is - when I try to run commands by running bitcoin-cli getblockchaininfo for example, I get the error:
error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/home/martin/.bitcoin/bitcoin.conf)
Steps to reproduce: I can reproduce it every time:
- run
bitcoind -daemon -datadir=path_to_datadir - wait for bitcoin server to start up
- try to run any
bitcoin-clicommand
Bitcoin core version and source: The version I'm using is bitcoind 0.15.1 . I installed it through the official bitcoin linux guide.
System details: The operating system -> ElementaryOS Loki 0.4.1. CPU -> Intel Core i7 (4th Gen) 4720HQ / 2.6 GHz . The hard disk -> External 4TB Seagate HDD
Extra information:
When I move the .cookie file from my external drive to /home/_username_/.bitcoin/bitcoin.conf the commands start working.
I've tried passing -rpccookiefile=path_to_cookie_file_on_External_hdd to it but that didn't work.
Setting -rpccookiefile= to the correct path matching the specified -datadir= location does not work.