I've reset my raspberry pi because after configuring Samba, bitcoind started downloading the blockchain much slower. Removing Samba didn't return it to the original speeds so I figured starting with a fresh Raspian SD card might speed things up again.
I am following the same instructions to install bitcoin-cli but this time I get this error
Error: Failed saving settings file:
- Error: Unable to open settings file /mnt/bitcoin/Coins/Blockchain/settings.json.tmp for writing
The full instructions I'm following are here. I've used the same drive mounted at the same place as before. I don't have a file settings.json.tmp
. I do have settings.json
and I naively cloned it and named it settings.json.tmp
, but it didn't help.
This is how I'm installing it:
tar xvf bitcoin-0.21.1-arm-linux-gnueabihf.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.21.1/bin/*
And this is how I'm trying to start it:
bitcoind -daemon --datadir=/mnt/bitcoin/Coins/Blockchain
I guessed maybe that the problem was that this time I was installing version 21.1 whereas before I was using version 21.0, I still had the old .tar.gz file so I tried installing the previous version, but got the same error.
Then I tried creating a new blockchain folder at /mnt/bitcoin/Coins/Blockchain2/
but I get the same error. If that's a fresh folder, why would it try to read any files?
Does anyone know what the problem is here? Googling the error returns absolutely nothing.
I would appreciate any help.
EDIT: Extra info
I've just tried creating a new folder in the home directory instead of the hard drive and it worked. So why not on the hard drive? When I try to sudo rm settings.json.tmp
I get rm: cannot remove 'settings.json.tmp': No such file or directory
. Why is it trying to read a file that's not even there?
EDIT 2: ls -l /mnt/bitcoin/Coins/Blockchain/
Here is the output of ls -l /mnt/bitcoin/Coins/Blockchain/
:
total 16896
-rwxr-xr-x 1 root root 37 Jun 18 17:19 anchors.3386
-rwxr-xr-x 1 root root 37 Apr 23 11:42 banlist.dat
-rwxr-xr-x 1 root root 5 Jun 12 20:40 bitcoind.pid
drwxr-xr-x 3 root root 262144 Jun 18 14:41 blocks
drwxr-xr-x 2 root root 262144 Jun 18 08:43 chainstate
-rwxr-xr-x 1 root root 12969496 Jun 18 17:19 debug.log
-rwxr-xr-x 1 root root 247985 May 19 15:27 fee_estimates.dat
-rwxr-xr-x 1 root root 18 May 19 15:27 mempool.dat
-rwxr-xr-x 1 root root 2623946 Jun 18 17:19 peers.dat
-rwxr-xr-x 1 root root 7 Jun 12 20:40 settings.json
drwxr-xr-x 2 root root 131072 Apr 23 11:42 wallets
ls -l /mnt/bitcoin/Coins/Blockchain2/
tell you?sudo bitcoind -daemon --datadir=/mnt/bitcoin/Coins/Blockchain
and it's working. I just kept the same alias that I used before. I don't get why it didn't need root before. Thanks so much for your help. 🦄