Bitcoin Forum
June 21, 2024, 12:39:40 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Error message "Error opening block database"  (Read 234 times)
ultrametalurge (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 1


View Profile
August 24, 2019, 10:52:29 AM
Merited by LoyceV (1)
 #1

I had to reinstall BTC core after my old harddrive crashed.  I got a new hard drive.  When i download bitcoin core, after it synchs anywhere between 30-60% of the blocks, I keep getting the error message "error opening block database. Do you want to rebuild the block database now?".  I click  yes, but then it says "error opening block database" and it won't allow me to download more blocks.  How do i fix this?
AdolfinWolf
Legendary
*
Offline Offline

Activity: 1946
Merit: 1427


View Profile
August 24, 2019, 12:05:02 PM
 #2

Might be useful to post the debug log here if you want people to look into it a bit further.

It sounds like your files are somehow corrupted though.

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
August 24, 2019, 03:54:37 PM
 #3

From what I remember, this problem normally gets fixed by renaming the last fine in your block data directory (the "blocks" folder in the data directory) and then restarting bitcoin core.

Like etf says if you provide us with more information we might be able to help more (posting the debug.log). It might also be helpful to know if you have any antivirus running as that can sometimes tamper with the storing of blocks (if you do, quarenteen the block database folder - don't completely deactivate the AV).
ultrametalurge (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 1


View Profile
August 25, 2019, 01:19:12 PM
 #4

Here is the latest from the debug log.

2019-08-25T13:13:22Z Cache configuration:
2019-08-25T13:13:22Z * Using 2.0 MiB for block index database
2019-08-25T13:13:22Z * Using 8.0 MiB for chain state database
2019-08-25T13:13:22Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
2019-08-25T13:13:22Z init message: Loading block index...
2019-08-25T13:13:22Z Opening LevelDB in I:\blocks\index
2019-08-25T13:13:22Z Opened LevelDB successfully
2019-08-25T13:13:22Z Using obfuscation key for I:\blocks\index: 0000000000000000
2019-08-25T13:13:22Z LoadBlockIndexDB: last block file = 0
2019-08-25T13:13:22Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2019-08-25T13:13:22Z Checking all blk files are present...
2019-08-25T13:13:22Z Initializing databases...
2019-08-25T13:13:22Z Opening LevelDB in I:\chainstate
2019-08-25T13:13:22Z Fatal LevelDB error: Corruption: 1616 missing files; e.g.: I:\chainstate/101567.ldb
2019-08-25T13:13:22Z You can use -debug=leveldb to get more complete diagnostic messages
2019-08-25T13:13:22Z Fatal LevelDB error: Corruption: 1616 missing files; e.g.: I:\chainstate/101567.ldb
2019-08-25T13:13:22Z : Error opening block database.
Please restart with -reindex or -reindex-chainstate to recover.
2019-08-25T13:13:28Z init message: Loading block index...
2019-08-25T13:13:28Z Wiping LevelDB in I:\blocks\index
2019-08-25T13:13:28Z Opening LevelDB in I:\blocks\index
2019-08-25T13:13:28Z Opened LevelDB successfully
2019-08-25T13:13:28Z Using obfuscation key for I:\blocks\index: 0000000000000000
2019-08-25T13:13:28Z Initializing databases...
2019-08-25T13:13:28Z Wiping LevelDB in I:\chainstate
2019-08-25T13:13:28Z Opening LevelDB in I:\chainstate
2019-08-25T13:13:28Z Fatal LevelDB error: Corruption: 1616 missing files; e.g.: I:\chainstate/101567.ldb
2019-08-25T13:13:28Z You can use -debug=leveldb to get more complete diagnostic messages
2019-08-25T13:13:28Z Fatal LevelDB error: Corruption: 1616 missing files; e.g.: I:\chainstate/101567.ldb
2019-08-25T13:13:28Z Error: Error opening block database
2019-08-25T13:13:29Z Shutdown: In progress...
2019-08-25T13:13:29Z scheduler thread interrupt
2019-08-25T13:13:29Z Shutdown: done
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
August 25, 2019, 01:22:43 PM
 #5

Yeah you still have to reindex but it means the error shouldn't show up again as you have to manually get rid of the problem and then reload the database...
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
August 25, 2019, 02:52:54 PM
 #6

If it happens frequently, it is usually a hardware issue.

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
Abdussamad
Legendary
*
Offline Offline

Activity: 3640
Merit: 1571



View Profile
August 30, 2019, 03:35:29 AM
 #7

Yeah it means your hard drive is dying.
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
August 30, 2019, 06:01:53 PM
 #8

Yeah it means your hard drive is dying.
OP mention "I got a new hard drive", so i doubt this case unless OP still uses his old HDD or got defect product (which is very unlikely)
In this context that can mean a replacement drive, which could be second hand one. A defect product is also not "very unlikely". HDDs aren't as reliable as they should be. Additionally, this doesn't mention whether it is an internal or external drive. In the case of the later, the issue is likely the connector.

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!