Node Setup Issues: LevelDB Corruption Errors

20 replies 237 views
guru_foxNewbie
Posts: 17 · Reputation: 28
#1Mar 3, 2019, 11:19 PM
Trying to set up my first node. Downloaded the whole blockchain to my external Samsung T7 SSD. The node works, but sometimes when I stop `bitcoind` using `bitcoin-cli stop`, I get this error: `[error] Fatal LevelDB error: Corruption: block checksum mismatch`. I reindexed a few times, and it runs fine for a while, then the same thing happens again. Always stopping with `bitcoin-cli stop`, always unmounting the SSD...
5 Reply Quote Share
Posts: 76 · Reputation: 149
#2Mar 4, 2019, 02:01 AM
Is your SSD okay? Sounds like it might be the problem. Corruption can happen if you unmount too quickly or if your RAM is low. Maybe try boosting your RAM and tweaking your Bitcoin Core settings.
0 Reply Quote Share
whale420Senior Member
Posts: 727 · Reputation: 853
#3Mar 4, 2019, 05:06 AM
Yeah, I think there’s a delay when you stop the daemon. If you unplug the SSD too fast, that could cause corruption. Wait a few minutes after stopping it. And if you're on Windows, check Task Manager to see if `bitcoind` is still running.
2 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#4Mar 6, 2019, 05:01 AM
Good point about the USB cable. If you're using a laptop, sometimes the cable can mess with the connection. A cable with separate power might help with this issue.
1 Reply Quote Share
guru_foxNewbie
Posts: 17 · Reputation: 28
#5Mar 7, 2019, 04:15 PM
This error might mean your UTXO set is getting corrupted. It happens when writing the cached state to disk or if the SSD is unplugged suddenly. Try lowering your dbcache and dbbatchsize settings.
4 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#6Mar 7, 2019, 04:26 PM
Happened again. Stopped with `bitcoin-cli stop`, waited, and still got the error. No unmounting or disconnecting involved this time. Just checked the debug log, and it’s showing some new connections... not sure what’s up.
2 Reply Quote Share
guru_foxNewbie
Posts: 17 · Reputation: 28
#7Mar 10, 2019, 03:49 AM
+1 to ruling out improper unmounting. Looks like the chainstate is still getting corrupted. The last shutdown process was clean, so it’s weird.
3 Reply Quote Share
whale420Senior Member
Posts: 727 · Reputation: 853
#8Mar 10, 2019, 04:56 AM
Your `.bitcoin` folder is a symlink to the external SSD, right? Sometimes that can create issues. You might want to avoid using symlinks and just point directly to the external SSD.
1 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#9Mar 10, 2019, 06:01 AM
Yup, symlink to the USB drive. But now I hit an error during `bitcoind -reindex-chainstate`. Can't connect to 127.0.0.1:9050. What gives?
0 Reply Quote Share
guru_foxNewbie
Posts: 17 · Reputation: 28
#10Mar 12, 2019, 03:05 PM
Sounds like typical data transfer issues. You should consider replacing the USB drive. If that doesn’t work, try moving your files to another SSD, reformat it, and make sure it's NTFS. FAT isn’t the best for this.
3 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#11Mar 12, 2019, 06:52 PM
Now it seems like one of my block index files is corrupted. Only way to fix it is with `-reindex`. But I'm worried it’s a hardware issue.
1 Reply Quote Share
guru_foxNewbie
Posts: 17 · Reputation: 28
#12Mar 12, 2019, 07:30 PM
Symlinks shouldn’t cause corruption. But if your SSD is acting up, it's better to keep everything on the system drive and point blocks directly there. Less hassle that way.
2 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#13Mar 12, 2019, 11:25 PM
SSD's ext4 format should be fine. But I read that model has slow write speeds. That might be part of the problem. Have you updated its firmware? That could help.
3 Reply Quote Share
guru_foxNewbie
Posts: 17 · Reputation: 28
#14Mar 12, 2019, 11:47 PM
I’ve got the same setup with that SSD model, and it works fine on my older laptop. You might need to lower the memory settings and clean your CPU fan to avoid overheating.
0 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#15Mar 13, 2019, 07:37 PM
Just found out my system time was off by an hour. Could that cause data corruption?
0 Reply Quote Share
whale420Senior Member
Posts: 727 · Reputation: 853
#16Mar 13, 2019, 07:47 PM
No way that would cause corruption. If the clock is just a bit off, it shouldn't mess with data integrity.
4 Reply Quote Share
alpha23Member
Posts: 116 · Reputation: 79
#17Mar 14, 2019, 02:34 AM
Yeah, as long as it’s not way off, you won’t have issues. Time misconfigurations usually lead to warnings, not random corruption.
0 Reply Quote Share
guru_foxNewbie
Posts: 17 · Reputation: 28
#18Mar 14, 2019, 03:40 AM
I’m just trying to learn by setting up a node. That’s why I’m using an external SSD, makes it easier to move around between different PCs.
3 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#19Mar 16, 2019, 10:27 AM
Using an external SSD might be more trouble than it’s worth. If you can, I’d suggest setting up an internal SSD for better performance.
3 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#20Mar 16, 2019, 11:25 AM
At this point, I just want to get it working without corruptions. I’ll keep troubleshooting and share any findings.
3 Reply Quote Share

Related topics