<p>What worked for me is restart <code>bitcoind</code>.</p>
<p>I don't have more details unfortunately.</p>
<blockquote>
<p>Have you tried turning it off and on again</p>
</blockquote>

CC BY-SA 4.0
2022-06-13T19:03:13.367Z
2022-06-13T19:03:13.367Z
tread
<p>I logged into my node to check the blockheight and saw that it was no longer running.</p>
<p>When I checked the logs I got:</p>
<pre><code>Apr 07 15:27:29 btc.home.local bitcoind[222318]: 2022-04-07T15:27:29Z New outbound peer connected: version: 70016, blocks=730857, peer=19090 (block-relay-only)
Apr 07 15:28:41 btc.home.local bitcoind[222318]: 2022-04-07T15:28:41Z New outbound peer connected: version: 70015, blocks=730857, peer=19093 (block-relay-only)
Apr 07 15:29:02 btc.home.local bitcoind[222318]: 2022-04-07T15:29:02Z UpdateTip: new best=00000000000000000006f59c754697e1cbcc330e9cd6dbd51c9631d33e617e83 height=730858 version=0x20000004 log2_work=93.446902 tx=723828017 date='2022-04-07T15:28:57Z' progress=1.000000 cache=109.8MiB(777828txo)
Apr 07 15:33:12 btc.home.local bitcoind[222318]: 2022-04-07T15:33:12Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000008b133defdf2bd580dc9c6b82ddad0ccf0e6ba0c30ab11e0491e089fe, bad-diffbits, incorrect proof of work
Apr 07 15:34:03 btc.home.local bitcoind[222318]: 2022-04-07T15:34:03Z New outbound peer connected: version: 70016, blocks=730858, peer=19185 (block-relay-only)
Apr 07 15:43:44 btc.home.local bitcoind[222318]: 2022-04-07T15:43:44Z ERROR: ReadRawBlockFromDisk: Block magic mismatch for FlatFilePos(nFile=16, nPos=811845): 4f238f1b versus expected f9beb4d9
Apr 07 15:43:44 btc.home.local bitcoind[222318]: bitcoind: net_processing.cpp:1777: void {anonymous}::PeerManagerImpl::ProcessGetBlockData(CNode&amp;, {anonymous}::Peer&amp;, const CInv&amp;): Assertion `!&quot;cannot load block from disk&quot;' failed.
</code></pre>
<p>In Summary:</p>
<ol>
<li>ERROR: AcceptBlockHeader - incorrect proof of work</li>
<li>ERROR: ReadRawBlockFromDisk - Block magic mismatch</li>
<li>A c++ error: Assertion `!&quot;cannot load block from disk&quot;' failed</li>
</ol>
<p>Previous questions are similar but do not address this situation exactly:</p>
<ul>
<li><a href="https://bitcoin.stackexchange.com/questions/88312/consistenly-getting-block-magic-mismatch-error">block magic mismatch - advice to redownload entire blockchain</a></li>
<li><a href="https://bitcoin.stackexchange.com/questions/60056/why-was-my-full-node-knocked-off-the-network-last-night">node knocked off - banned</a></li>
</ul>
<p>What is the correct way to fix this issue? (I have re-downloaded/re-indexed the blockchain <em>before</em> and it takes too long to be feasible)</p>
<p>Update June 2022:</p>
<pre><code>Jun 13 17:58:48 btc bitcoind[840]: 2022-06-13T17:58:48Z New outbound peer connected: version: 70016, blocks=740639, peer=94798 (block-relay-only)
Jun 13 18:23:39 btc bitcoind[840]: 2022-06-13T18:23:39Z ERROR: ReadRawBlockFromDisk: Read from block file failed: CAutoFile::read: end of file: iostream error for FlatFilePo&gt;
Jun 13 18:23:39 btc bitcoind[840]: bitcoind: net_processing.cpp:1777: void {anonymous}::PeerManagerImpl::ProcessGetBlockData(CNode&amp;, {anonymous}::Peer&amp;, const CInv&amp;): Assert&gt;
Jun 13 18:23:53 btc systemd[1]: bitcoind.service: Main process exited, code=killed, status=6/ABRT
Jun 13 18:23:53 btc systemd[1]: bitcoind.service: Failed with result 'signal'.
</code></pre>
<p>My config:</p>
<pre><code>[main]
datadir=/mnt/btc/bitcoin

maxconnections=32
maxuploadtarget=2048
</code></pre>
<blockquote>
<p>After changing to 32 max connections from 16 - I encountered this issue.</p>
</blockquote>
<p><strong>Update: Still not fixed</strong></p>
<pre><code>Jun 13 21:21:40 btc bitcoind[26301]: 2022-06-13T21:21:40Z New outbound peer connected: version: 70016, blocks=740662, peer=776 (block-relay-only)
Jun 13 21:29:33 btc bitcoind[26301]: 2022-06-13T21:29:33Z ERROR: ReadRawBlockFromDisk: Block magic mismatch for FlatFilePos(nFile=16, nPos=28970925): 53aeffff versus expected f9beb4d9
Jun 13 21:29:33 btc bitcoind[26301]: bitcoind: net_processing.cpp:1777: void {anonymous}::PeerManagerImpl::ProcessGetBlockData(CNode&amp;, {anonymous}::Peer&amp;, const CInv&amp;): Assertion `!&quot;cannot load &gt;
</code></pre>

CC BY-SA 4.0
2022-04-11T17:26:28.613Z
Is your hard drive connected via USB or the blockchain data stored on a SD card?
Murch
CC BY-SA 4.0
2022-04-11T18:10:56.883Z
Connected via USB
tread
CC BY-SA 4.0
2022-04-11T22:33:57.020Z
I'd guess that you had a write error. You may want to try connecting it via SATA.
Murch
<full-node>
How to fix the Bitcoind service shutdown seemingly by invalid block?
tread
# How to fix the Bitcoind service shutdown seemingly by invalid block?

(Asked by: username_0 on 2022-04-08)

I logged into my node to check the blockheight and saw that it was no longer running.

When I checked the logs I got:

```
Apr 07 15:27:29 btc.home.local bitcoind[222318]: 2022-04-07T15:27:29Z New outbound peer connected: version: 70016, blocks=730857, peer=19090 (block-relay-only)
Apr 07 15:28:41 btc.home.local bitcoind[222318]: 2022-04-07T15:28:41Z New outbound peer connected: version: 70015, blocks=730857, peer=19093 (block-relay-only)
Apr 07 15:29:02 btc.home.local bitcoind[222318]: 2022-04-07T15:29:02Z UpdateTip: new best=00000000000000000006f59c754697e1cbcc330e9cd6dbd51c9631d33e617e83 height=730858 version=0x20000004 log2_work=93.446902 tx=723828017 date='2022-04-07T15:28:57Z' progress=1.000000 cache=109.8MiB(777828txo)
Apr 07 15:33:12 btc.home.local bitcoind[222318]: 2022-04-07T15:33:12Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000008b133defdf2bd580dc9c6b82ddad0ccf0e6ba0c30ab11e0491e089fe, bad-diffbits, incorrect proof of work
Apr 07 15:34:03 btc.home.local bitcoind[222318]: 2022-04-07T15:34:03Z New outbound peer connected: version: 70016, blocks=730858, peer=19185 (block-relay-only)
Apr 07 15:43:44 btc.home.local bitcoind[222318]: 2022-04-07T15:43:44Z ERROR: ReadRawBlockFromDisk: Block magic mismatch for FlatFilePos(nFile=16, nPos=811845): 4f238f1b versus expected f9beb4d9
Apr 07 15:43:44 btc.home.local bitcoind[222318]: bitcoind: net_processing.cpp:1777: void {anonymous}::PeerManagerImpl::ProcessGetBlockData(CNode&, {anonymous}::Peer&, const CInv&): Assertion `!"cannot load block from disk"' failed.

```

In Summary:

1. ERROR: AcceptBlockHeader - incorrect proof of work
2. ERROR: ReadRawBlockFromDisk - Block magic mismatch
3. A c++ error: Assertion `!"cannot load block from disk"' failed

Previous questions are similar but do not address this situation exactly:

* [block magic mismatch - advice to redownload entire blockchain](https://bitcoin.stackexchange.com/questions/88312/consistenly-getting-block-magic-mismatch-error)
* [node knocked off - banned](https://bitcoin.stackexchange.com/questions/60056/why-was-my-full-node-knocked-off-the-network-last-night)

What is the correct way to fix this issue? (I have re-downloaded/re-indexed the blockchain *before* and it takes too long to be feasible)

Update June 2022:

```
Jun 13 17:58:48 btc bitcoind[840]: 2022-06-13T17:58:48Z New outbound peer connected: version: 70016, blocks=740639, peer=94798 (block-relay-only)
Jun 13 18:23:39 btc bitcoind[840]: 2022-06-13T18:23:39Z ERROR: ReadRawBlockFromDisk: Read from block file failed: CAutoFile::read: end of file: iostream error for FlatFilePo>
Jun 13 18:23:39 btc bitcoind[840]: bitcoind: net_processing.cpp:1777: void {anonymous}::PeerManagerImpl::ProcessGetBlockData(CNode&, {anonymous}::Peer&, const CInv&): Assert>
Jun 13 18:23:53 btc systemd[1]: bitcoind.service: Main process exited, code=killed, status=6/ABRT
Jun 13 18:23:53 btc systemd[1]: bitcoind.service: Failed with result 'signal'.

```

My config:

```
[main]
datadir=/mnt/btc/bitcoin

maxconnections=32
maxuploadtarget=2048

```

> After changing to 32 max connections from 16 - I encountered this issue.

**Update: Still not fixed**

```
Jun 13 21:21:40 btc bitcoind[26301]: 2022-06-13T21:21:40Z New outbound peer connected: version: 70016, blocks=740662, peer=776 (block-relay-only)
Jun 13 21:29:33 btc bitcoind[26301]: 2022-06-13T21:29:33Z ERROR: ReadRawBlockFromDisk: Block magic mismatch for FlatFilePos(nFile=16, nPos=28970925): 53aeffff versus expected f9beb4d9
Jun 13 21:29:33 btc bitcoind[26301]: bitcoind: net_processing.cpp:1777: void {anonymous}::PeerManagerImpl::ProcessGetBlockData(CNode&, {anonymous}::Peer&, const CInv&): Assertion `!"cannot load >

```

**Tags:** full-node

> **Comments:**
> **username_1**: Is your hard drive connected via USB or the blockchain data stored on a SD card?  
> **username_0**: Connected via USB  
> **username_1**: I'd guess that you had a write error. You may want to try connecting it via SATA.  

---

## 1 answers

### Answer by username_0 on 2022-06-13. Score: 1

What worked for me is restart `bitcoind`.

I don't have more details unfortunately.

> Have you tried turning it off and on again


---

