1

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?

1

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.

  • 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 Jun 11 at 16:52
  • 1
    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 Jun 11 at 17:17
  • 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 Jun 11 at 17:41

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.