My home server's been down for a couple of days while I do some upgrades.

I'd had Geth running in one of the terminal windows, but shut it down gracefully using exit before taking the server offline.

On trying to restart it, I'm seeing the below error:

I0208 14:31:27.219469   26346 downloader.go:267] Synchronisation
failed: leveldb/table: corruption on data-block (pos=650747): checksum
mismatch, want=0x2dd4b443 got=0x9fb5cf2f [file=286265.ldb]

How do I go about investigating and fixing this problem? Is there a way to remove the offending part of the data and force it to resync that particular part? I clearly don't want to have to re-sync everything from scratch...

(Note: I've run fsck on the (unmounted) disk without finding any problems. The upgrades didn't touch the disks. Everything was shut down gracefully.)

  • Note that if deleting the chaindata folder isn't enough, try deleting the nodes folder as well. – HandleThatError Jun 18 '17 at 6:57
up vote 8 down vote accepted

Can't really say what could have gone wrong, but your database is corrupted at the LevelDB storage engine level. Something seems to have modified the flat data files that leveldb uses to store its stuff in. There isn't much you can do to recover them I'm afraid.

You should be able to fast sync back to the network fairly quickly. It usually takes about half an hour for me to sync from scratch. Just start geth with --fast --cache=512.

  • So literally remove everything and start from nothing? (I've asked a separate question about how --fast works.) – Richard Horrocks Feb 8 '16 at 15:31
  • Only remove the chaindata folder. The rest should remain. – Péter Szilágyi Feb 8 '16 at 17:47
  • Yep, that's what I've done - thanks :) – Richard Horrocks Feb 8 '16 at 17:54

Note: I've run fsck on the (unmounted) disk without finding any problems.

fsck is a good tool to check for filesystem level problems, but not hardware level. I'd always start at the hardware level and move up from there.

Have you checked the SMART status on your hard drives recently? http://www.howtogeek.com/134735/how-to-see-if-your-hard-drive-is-dying/

I'd also check your memory for problems. http://windows.microsoft.com/en-us/windows7/diagnosing-memory-problems-on-your-computer

(There are different ways to accomplish the same thing in Linux. smartctl, memtest86, and fsck.)

After you've determined no errors from above, only then would I take the advice of clearing out chaindata and resyncing using --fast

protected by Community Jun 19 '17 at 6:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.