0

So I already have the node set up on my raspberry pi. This night the transfer of the Blockchain from my laptop to the raspi's hard disk finished. Now I am waiting for the blocks to match the headers

"blocks": 162064, "headers": 613982

The thing is that when I do bitcoin-cli getblockchaininfo to check if it is already complete, I get this error:

error: Could not connect to the server 127.0.0.1:8332
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

I check if bitcoind is running with systemctl status bitcoind.service and this shows up:

● bitcoind.service - Bitcoin daemon

Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled)

Active: activating (auto-restart) (Result: exit-code) since Wed 2020-01-22 11:59:12 CET; 15s ago

Process: 811 ExecStartPre=/bin/sh -c sleep 30 (code=exited, status=0/SUCCESS)

Process: 814 ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid (code=exited, status=0/SUCCESS)

Main PID: 815 (code=exited, status=1/FAILURE)

So I try to restart the bitcoin daemon with sudo systemctl stop bitcoind and sudo systemctl start bitcoind. And when I check its status it shows the following (which looks good):

bitcoind.service - Bitcoin daemon

Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled)

Active: active (running) since Wed 2020-01-22 12:01:01 CET; 5s ago

Process: 862 ExecStartPre=/bin/sh -c sleep 30 (code=exited, status=0/SUCCESS)

Process: 864 ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid (code=exited, status=0/SUCCESS)

Main PID: 865 (bitcoind)

Tasks: 12 (limit: 2200)

Memory: 111.0M

CGroup: /system.slice/bitcoind.service

└─865 /usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid

And when I do bitcoin-cli getblockchaininfo again, it doesn't show me an error, but the number of blocks synchronized is lower than before. And a few minutes later, when I go check again it all repeats itself.

What am I supposed to do here?

Thanks

  • How much memory (RAM) does you Raspberry Pi have? – 0xb10c Jan 22 at 19:08
  • No idea, it's a raspberry pi 3, not 3 B and surely not 4. – nerviosus Jan 22 at 21:11
  • Look into the logs, which are written by the daemon. Or try to run it in non-daemonized state and look at its output in realtime, may be this will give you some clues. – MartinSolie Jan 23 at 14:46
  • You can see your RAM with the free -h or the htop command. – 0xb10c Jan 25 at 13:05
0

As @MartinSolie noted, it might be helpful to look into the debug.log file.

Based on what you describe, it sounds like your Bitcoin Core node crashes at some point while synchronizing. You mentioned that you copied the chain from another device. Since you mentioned you are waiting for the blocks to match the headers, I'm not sure the transferred chain is correctly recognized by Bitcoin Core. Your Bitcoin Core is either re-indexing the whole chain or even downloading it. On a Raspberry 3 this can take quite a while (i.e. multiple weeks).

Bitcoin Core probably crashes, because it runs out of memory. One way of solving that would be to add a SWAP file on your HDD (don't do it on the SD Card! Swapping kills the SD card over time).

| improve this answer | |

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.