It tells you, try starting it up with - debug=leveldb
But it's likely you'll have to redownload the chain.
I hope I don't have to. I have been having this problem since last week. And last week I stopped bitcoin daemon normally, tried the '-reindex' option but then I was told to cancel the '-reindex' and just try to restart the daemon normally. So I did and the laptop was almost 24h checking all transactions from the very beginning. Not downloading the entire chain, just re-checking txo's.
Then it finished and was working since then. So I didn't pay much more attention to it until 2 days ago when I noticed the node was not running.
Now I started the daemon again and after it was running normally, I shut it down with 'bitcoin-cli stop' and I can see this:
2020-06-02T23:06:06Z Fatal LevelDB error: Corruption: block checksum mismatch: /media/Storage/Blockchain/chainstate/060607.ldb
-snip-
2020-06-02T23:06:06Z *** System error while flushing: Fatal LevelDB error: Corruption: block checksum mismatch: /media/Storage/Blockchain/chainstate/060607.ldb
-snip-
2020-06-02T23:06:06Z ForceFlushStateToDisk: failed to flush state (System error while flushing: Fatal LevelDB error: Corruption: block checksum mismatch: /media/Storage/Blockchain/chainstate/060607.ldb)
-snip-
2020-06-02T23:06:06Z Fatal LevelDB error: Corruption: block checksum mismatch: /media/Storage/Blockchain/chainstate/060607.ldb
-snip-
2020-06-02T23:06:06Z *** System error while flushing: Fatal LevelDB error: Corruption: block checksum mismatch: /media/Storage/Blockchain/chainstate/060607.ldb
-snip-
2020-06-02T23:06:06Z ForceFlushStateToDisk: failed to flush state (System error while flushing: Fatal LevelDB error: Corruption: block checksum mismatch: /media/Storage/Blockchain/chainstate/060607.ldb)
Seems like there an issue with file:
/media/Storage/Blockchain/chainstate/060607.ldbIs it still crashing?
If it is: Shutdown Core normally then try to delete the "
chainstate" folder in "
/media/Storage/Blockchain/".
Start Core and it will rebuild the database (
not redownload the blockchain); if it still crash, check the latest log.
It just crashed again. It was working well since yesterday night (when I noticed it was stopped) until 5 minutes ago. It has been working but I can see this block error every now and then, probably when the daemon dumps the cache onto the drive.
Do you think I need to delete the entire 'chainstate' folder? Wouldn't that single file be enough to delete and the daemon re-download it again?
OP, you might want to check and test your HDD/SSD health if the problem persists after following advice by other members. Use tools called
smartctl to do so.
Just in case you never use it, here's short command that i usually use
* See general information
sudo smartctl -a /dev/
* Perform short or long test
sudo smartctl --test=short /dev/
sudo smartctl --test=long /dev/
Then use
sudo smartctl -a /dev/ again to see the test result
It tells you, try starting it up with - debug=leveldb
But it's likely you'll have to redownload the chain.
Only if the blockchain files corrupted as well, from the log, looks like only single chainstate file is corrupted.
Thanks for the cheat sheet of commands.
Edited:
Well, I just noticed the error is now on a different file... A file that doesn't even exist in my chainstate folder. It's '061114.ldb' file.
I also noticed something I'm not sure is normal. I have a symlink inside 'chainstate' to... 'chainstate'...
-rw------- 1 narayan narayan 88K ago 15 2019 104069.ldb
lrwxrwxrwx 1 narayan narayan 10 ago 10 2019 chainstate -> chainstate
-rw------- 1 narayan narayan 16 ago 15 2019 CURRENT
-rw------- 1 narayan narayan 0 ago 10 2019 LOCK
-rw------- 1 narayan narayan 337K ago 15 2019 MANIFEST-102299