Hey there.
So, I haven't touched bitcoin core on my Ubuntu 20.04 for probably a month or two. When I finally fired it up again using bitcoin-qt in the terminal like usual, it started syncing but then hit me with this "Error reading from database, shutting down." message.
I tried resyncing since I found that tip floating around online, mostly from posts that are years old. After about 7 hours of waiting, boom... same error again and had to shut it down.
I figured I’d just redownload the whole thing. So I deleted the blockchain and let it download from scratch. Took like 9 hours and guess what, same error.
Then I completely uninstalled bitcoin core 25.0 that I got from bitcoin.org and went to install it again. But when I did, there was no prompt asking where to store the blockchain, it just defaulted to the old location like I hadn’t even uninstalled it.
I have a 1TB Samsung SSD that’s supposed to be one of the best out there. Got it specifically for blockchains.
Tried running it again after reinstalling, and after a bunch of hours it threw the same error. What's weird is it fails at different blocks every time. If I try to run it again, it’ll stop at the same block unless I redownload the blockchain, then it just fails at a new one.
So, I even went ahead and deleted that specific block before trying again. Hours later and guess what, same error but this time at a different block.
This whole debugging thing is just...
Constant 'Error reading from database, shutting down.' issue after multiple tries
8 replies 164 views
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#2Oct 22, 2021, 07:36 PM
Try to replace the HDD's sATA cable or switch to the other ports.
Then try IBD again.
If it still produced a random corrupted block or other data, check for other hardware issues specially the RAM and others.
BTW, you should consider checking the "debug.log" in each of your attempts, you can find it inside your bitcoin data directory.
Open it as text, then check for the related error(s), usually such issue has the error in the last few lines.
Check if you have a data directory in the default location: https://en.bitcoin.it/wiki/Data_directory#Default_Location
In Windows, v28 may use the local appdata instead of roaming if it can't find one in the previous default.
Hi, thanks for the reply. I opened a new sata cable and also changed the port of the drive again, this time the error showed up really fast. Now when running again, the error is the first thing it does which used not to happen. I had already checked the debug.log which is the same I get printed on the terminal:
It doesn't really lead me much.
How would you check for other hardware or what hardware? I just don't know how other factors could cause an error. Mistral suggested the time of my computer may mismatch or something but what it suggested to fix it seemed like it would break new things since it was pretty manual.
My last resort would be to just try a new drive which would be very disappointing of this one even if the tests came out good.
Regarding on other ways of downloading the blockchain that could help pinpoint the issue, do you know any?
Thanks.
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#4Oct 23, 2021, 02:21 AM
Fair enough, this can only tell if the corrupted file is persistent or not which could roughly tell if it's caused by the software or hardware.
In any case, that indicates that you can just use --reindex-chainstate rather than full IBD which saves you a lot of testing time and internet bandwidth.
That is considering that there's no other errors in the logs.
Depends on the OS, usually most of those have a tool that can check for RAM integrity.
For the processor, you may need a complete hardware tester or something dedicated to CPU, search for a full hardware tester.
Yeah, most of the time, that kind of error is disk-related.
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#5Oct 23, 2021, 06:14 AM
Have you checked the drive's Smart data? It sounds like it's failing.
When you first start Bitcoin Core, it gives this warning:
How's your CPU temperature? No dust in the fan?
I would follow these steps:
Before formatting, make backups of the wallets if necessary.
1-Format the SSD drive.
2.Reinstall Ubuntu from scratch, to prevent problems in the operating system.
3-Reinstall Core.
If the problem persists, try testing with each RAM individually.
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#7Oct 24, 2021, 08:06 AM
That's pointless because of SSD wear leveling. If the disk is bad, replace it.
You're right, my bad, I didn't take into account that ssd operate a bit differently from traditional hard drives and manage defective sectors internally through their firmware. But performing a clean installation is still a good starting point before considering changing a component.
hodler2019Legendary
Posts: 2182 · Reputation: 12913
#9Oct 24, 2021, 04:32 PM
first off you should have a 2tb ssd not a 1 tb.
Samsung are good but what one ?
lastly you should clone your new drive.
I am using Samsung 990 evo plus 4tb
or Samsung 990 evo plus 2tb
ssd's
https://www.amazon.com/SAMSUNG-Technology-Intelligent-Turbowrite-MZ-V9S2T0B/dp/B0DHLCRF91/ref=sr_1_1?
2tb 990 evo plus is pretty good. and not costly
Related topics
- Issue with Bitcoin Core Wallet after power outage 8
- mandatory-script-verify-flag-failed (Non-canonical DER signature issue) 19
- bitcoin-qt sync issues and slow speeds 6
- Recovering a Bitcoin wallet and address 8
- Creating a list of non-zero wallets and their balances using Python 4
- CipherSeed: A Comprehensive Guide to Super-Secure Crypto Wallet Backups 5