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

<p>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 <em>blocks to match the headers</em>, 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).</p>

<p>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). </p>

CC BY-SA 4.0
2020-01-25T13:53:36.970Z
2020-01-25T13:53:36.970Z
0xb10c
<p>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</p>

<pre><code>"blocks": 162064, "headers": 613982
</code></pre>

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

<pre><code>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.
</code></pre>

<p>I check if bitcoind is running with <code>systemctl status bitcoind.service</code> and this shows up:</p>

<pre><code>● 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)
</code></pre>

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

<pre><code>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
</code></pre>

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

<p>What am I supposed to do here?</p>

<p>Thanks</p>

CC BY-SA 4.0
2020-01-22T19:08:09.637Z
How much memory (RAM) does you Raspberry Pi have?
0xb10c
CC BY-SA 4.0
2020-01-22T21:11:17.250Z
No idea, it's a raspberry pi 3, not 3 B and surely not 4.
nerviosus
CC BY-SA 4.0
2020-01-23T14:46:27.100Z
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
CC BY-SA 4.0
2020-01-25T13:05:37.057Z
You can see your RAM with the `free -h` or the `htop` command.
0xb10c
<bitcoind><nodes><full-node><raspberry-pi><daemon>
Error while syncing with the blockchain on my Raspberry Pi
nerviosus
# Error while syncing with the blockchain on my Raspberry Pi

(Asked by: username_0 on 2020-01-22)

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

**Tags:** bitcoind, nodes, full-node, raspberry-pi, daemon

> **Comments:**
> **username_1**: How much memory (RAM) does you Raspberry Pi have?  
> **username_0**: No idea, it's a raspberry pi 3, not 3 B and surely not 4.  
> **username_2**: 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.  
> **username_1**: You can see your RAM with the `free -h` or the `htop` command.  

---

## 1 answers

### Answer by username_1 on 2020-01-25. Score: 1

As @username_2 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).


---

