I just pulled latest master at https://github.com/bitcoin/bitcoin/commit/3ace3a17c9bce606cea05192f0da3ac62ac69dda and I cannot run bitcoind or bitcoin-cli without providing a full path for data directory using -datadir
option. It was working fine couple of days ago (while running https://github.com/bitcoin/bitcoin/commit/807169e10b4a18324356ed6ee4d69587b96a7c70). I suspect it may be related to latest switch to the standard std::filesystem library #20744
Expected behavior
I use a symbolic link to point my /home/me/.bitcoin to an external hard drive. When running bitcoind
from command line, or executing bitcoin-cli
commands, without using the -datadir
option, it should not terminate or crash unexpectedly. Those commands should be able to follow the symbolic link and be able to read/write into the final folder.
Actual behavior
bitcoind
and bitcoin-cli
are not able to follow the symbolic link. bitcoin-qt
runs fine, even when running it from command line. See below commands examples.
0# Create a symbolic link
1$~/btc-things/bitcoin$ ln -s /media/DATA/Bitcoin /home/me/.bitcoin
2
3# Try to run bitcoind - Crashes
4$~/btc-things/bitcoin$ ./bitcoind
5
6
7************************
8EXCEPTION: NSt10filesystem7__cxx1116filesystem_errorE
9filesystem error: cannot create directories: Not a directory [/home/me/.bitcoin]
10bitcoin in AppInit()
11
12bitcoind: chainparamsbase.cpp:35: const CBaseChainParams& BaseParams(): Assertion `globalChainBaseParams' failed.
13Aborted (core dumped)
14
15# Run bitcoin-qt, it works fine, the node runs
16$~/btc-things/bitcoin$ ./bitcoin-qt
17qt5ct: using qt5ct plugin
18
19# Try to run a bitcoin-cli command to interact with the running node, does not work
20$~/btc-things/bitcoin$ ./bitcoin-cli getblockhash 501726
21
22
23************************
24EXCEPTION: NSt10filesystem7__cxx1116filesystem_errorE
25filesystem error: cannot create directories: Not a directory [/home/me/.bitcoin]
26bitcoin in AppInitRPC()
27
28# Try the same previous command but give an absolute path for -datadir, works fine
29$~/btc-things/bitcoin$ ./bitcoin-cli -datadir=/media/DATA/Bitcoin getblockhash 501726
300000000000000000004b27f9ee7ba33d6f048f684aaeb0eea4befd80f1701126
To reproduce
Steps are indicated previously.
System information
Running Bitcoin Core version v22.99.0-3ace3a17c9bc
. Self compiled from master
branch.
I’m using Linux Mint with the following kernel Linux 5.4.0-96-generic x86_64
.
I’m using an additional hard drive to store the full blockchain (SSD).
I had no prior issues before pulling latest changes. I was previously running at https://github.com/bitcoin/bitcoin/commit/807169e10b4a18324356ed6ee4d69587b96a7c70