For some reason today, the Monero wallet stopped connecting to the daemon. The best reason for the error I could find is this: Attempt to get block from height 1396361 failed -- block not in db

So I tried to download a fresh version of the GUI, reboot computer, upload blockchain manually, and whatever else I could find to troubleshoot or fix. No luck.

I just want to start fresh. I have my key, so would like to start over and restore my wallet. But I tried deleting everything and starting over, but daemon will still not run.

I'm on Mac OS X Sierra. Any advice?

2 Answers 2


Unfortunately, this looks like a corrupt blockchain database.

With, monerod has a --db-salvage option which might be able to recover your database. Exit monerod, and run it again with that option appended, eg: ./monerod --db-salvage.

Otherwise, the only fix for tis is to exit monerod, delete the blockchain (~/.bitmonero/lmdb/data.mdb) and start monerod again. It will then sync the blockchain again. Nothing needs to be done with the wallet, the GUI, etc. Just the blockchain.

  • Thank you! How do I append monerod? I can open monerod and view it, but it doesn't have the option to edit. I can open a terminal...not sure if that's the route to go. Curious so I can maybe fix this faster than resyncing entire blockchain. That took about 4 days last time. If that doesn't work out, I'll just delete the blockchain and see how that goes.
    – Ricknad0
    Commented Oct 6, 2017 at 15:53
  • If you're running it from a terminal, just add " --db-salvage" at the end of the command, but it sounds you're not running it that way. If you're letting it be started by the GUI wallet automatically, there's a text widget in the settings page where you can add custom daemon options: that's where you'd add --db-salvage. If you're running the daremon manually by clicking on an icon, then I don't know how to, but right click on the icon and see if there's a menu allowing you to do that.
    – user36303
    Commented Oct 6, 2017 at 17:31
  • OK, so the --db-salvage thing didn't work for me. So I deleted a file data.mdb found in the ~/.bitmonero area. Looks like the blockchain is re-syncing. I think this was the solution, but I'll be back in about 3 days to report once it's done syncing.
    – Ricknad0
    Commented Oct 10, 2017 at 17:01
  • PS. Forgot to come back to update, but yes, this did fix my issue.
    – Ricknad0
    Commented Aug 9, 2018 at 20:38

You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain.

Do you want to rebuild the block database now?

  • "using -reindex to go back to unpruned mode", wrong, there's no such option.
    – jtgrassie
    Commented May 26, 2023 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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