<p>You have a corrupted block file. You will need to delete that file and all higher number files and then redownload the entire blockchain.</p>

<p>The block file that is corrupted is the 0th file, blk0000.dat. Since this is the first block file that Bitcoin Core creates, the easiest thing for you to do is to just delete the entire <code>blocks</code> and <code>chainstate</code> folders in your Bitcoin Core datadir. Then start Bitcoin Core. It will redownload the entire Bitcoin blockchain.</p>

CC BY-SA 4.0
2019-06-11T16:52:11.990Z
Oh man, this keeps happening.  I've had to reindex multiple times.  Maybe reindex was the incorrect thing to do.. I read that it keeps whatever blocks I have in my harddrive and downloads missing blocks.  Anyways, will give deleting the whole blocks directory a try.  Thanks!
ooomid
CC BY-SA 4.0
2019-06-11T17:17:21.707Z
If this keeps happening, you likely have a hardware issue (disk corruption, CPU overheating, bad memory, ...). Note that this is possible even when you don't have problems with other software; Bitcoin Core tends to push hardware much more than most things, and is also far more sensitive to certain classes of errors.
Pieter Wuille
CC BY-SA 4.0
2019-06-11T17:41:32.430Z
Thank you for your input senpai!  It's currently running on an ancient laptop that probably does overheat.  I'm thinking of building a dedicated server.
ooomid
CC BY-SA 4.0
2019-06-11T16:48:37.523Z
2019-06-11T16:48:37.523Z
Ava Chow
<p>I have bitcoind running (0.18) in my ubuntu machine and it keeps shutting down due after getting this error:</p>

<p><code>ERROR: ReadRawBlockFromDisk: Block magic mismatch for CDiskBlockPos(nFile=0, nPos=68821043): 00040000 versus expected f9beb4d9</code></p>

<p>I restart it and it goes for a couple of hours and then the same error is encountered and it shuts down.  How can I fix this?</p>

<bitcoind>
Consistenly getting Block magic mismatch error?
ooomid
# Consistenly getting Block magic mismatch error?

(Asked by: username_0 on 2019-06-11)

I have bitcoind running (0.18) in my ubuntu machine and it keeps shutting down due after getting this error:

`ERROR: ReadRawBlockFromDisk: Block magic mismatch for CDiskBlockPos(nFile=0, nPos=68821043): 00040000 versus expected f9beb4d9`

I restart it and it goes for a couple of hours and then the same error is encountered and it shuts down. How can I fix this?

**Tags:** bitcoind


---

## 1 answers

### Answer by username_1 on 2019-06-11. Score: 1 | Accepted answer

You have a corrupted block file. You will need to delete that file and all higher number files and then redownload the entire blockchain.

The block file that is corrupted is the 0th file, blk0000.dat. Since this is the first block file that Bitcoin Core creates, the easiest thing for you to do is to just delete the entire `blocks` and `chainstate` folders in your Bitcoin Core datadir. Then start Bitcoin Core. It will redownload the entire Bitcoin blockchain.

> **Comments:**
> **username_0**: Oh man, this keeps happening.  I've had to reindex multiple times.  Maybe reindex was the incorrect thing to do.. I read that it keeps whatever blocks I have in my harddrive and downloads missing blocks.  Anyways, will give deleting the whole blocks directory a try.  Thanks!  
> **username_2**: If this keeps happening, you likely have a hardware issue (disk corruption, CPU overheating, bad memory, ...). Note that this is possible even when you don't have problems with other software; Bitcoin Core tends to push hardware much more than most things, and is also far more sensitive to certain classes of errors.  
> **username_0**: Thank you for your input senpai!  It's currently running on an ancient laptop that probably does overheat.  I'm thinking of building a dedicated server.  

---

