Bitcoin Forum
December 12, 2017, 06:53:40 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 »  All
  Print  
Author Topic: "Error opening block database. Do you want to rebuild the block database now?"  (Read 46744 times)
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 01:12:47 AM
 #1

Just opened 0.8.1 after having successfully opened it a few times and received:
"Error opening block database. Do you want to rebuild the block database now?"

I clicked OK. Here is the debug.log. What might have happened? It shut down cleanly last time.

Bitcoin version v0.8.1-beta (2013-03-17 15:35:36 -0400)
Using OpenSSL version OpenSSL 1.0.1c 10 May 2012
Startup time: 2013-03-20 01:05:38
Default data directory C:\Users\User\AppData\Roaming\Bitcoin
Used data directory C:\Users\User\AppData\Roaming\Bitcoin
Using 4 threads for script verification
init message: Verifying wallet integrity...
dbenv.open LogDir=C:\Users\User\AppData\Roaming\Bitcoin\database ErrorFile=C:\Users\User\AppData\Roaming\Bitcoin\db.log
Bound to [::]:8333
Bound to 0.0.0.0:8333
init message: Loading block index...
Opening LevelDB in C:\Users\User\AppData\Roaming\Bitcoin\blocks\index
Opened LevelDB successfully
Opening LevelDB in C:\Users\User\AppData\Roaming\Bitcoin\chainstate
Opened LevelDB successfully
LoadBlockIndex(): last block file = 9
LoadBlockIndex(): last block file: CBlockFileInfo(blocks=726, size=73739518, heights=226085..226810, time=2013-03-16..2013-03-19)
LoadBlockIndex(): transaction index disabled
LoadBlockIndex(): hashBestChain=00000000000002f51920c4ef0b7f89c08df10c7c8594a750d30532bfd9a7575b  height=226810 date=2013-03-19 22:32:29
init message: Verifying block database integrity...
Verifying last 288 blocks at level 3
LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.
init message: Loading block index...
Wiping LevelDB in C:\Users\User\AppData\Roaming\Bitcoin\blocks\index
Opening LevelDB in C:\Users\User\AppData\Roaming\Bitcoin\blocks\index
Opened LevelDB successfully
Wiping LevelDB in C:\Users\User\AppData\Roaming\Bitcoin\chainstate
Opening LevelDB in C:\Users\User\AppData\Roaming\Bitcoin\chainstate
Opened LevelDB successfully
Initializing databases...

"The difference between a castle and a prison is only a question of who holds the keys."
1513104820
Hero Member
*
Offline Offline

Posts: 1513104820

View Profile Personal Message (Offline)

Ignore
1513104820
Reply with quote  #2

1513104820
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513104820
Hero Member
*
Offline Offline

Posts: 1513104820

View Profile Personal Message (Offline)

Ignore
1513104820
Reply with quote  #2

1513104820
Report to moderator
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2338


✪ NEXCHANGE | BTC, LTC, ETH & DOGE ✪


View Profile
March 20, 2013, 01:27:56 AM
 #2

LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.

Is it possible your disk is full?

keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 01:28:53 AM
 #3

LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.

Is it possible your disk is full?

Good question but I have a few 100 gigs free.

"The difference between a castle and a prison is only a question of who holds the keys."
grue
Global Moderator
Legendary
*
Offline Offline

Activity: 2044



View Profile
March 20, 2013, 02:25:57 AM
 #4

have you tried moving the data directory to some other drive, and starting bitcoin with datadir=d:\new directory\ ?

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
March 20, 2013, 02:30:02 AM
 #5

How old is your HDD? You could be dealing with a faulty disk drive.

Code:
LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 02:39:09 AM
 #6

How old is your HDD? You could be dealing with a faulty disk drive.

Code:
LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.

It is about two years now. I can run some SMART tests.

"The difference between a castle and a prison is only a question of who holds the keys."
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 02:42:32 AM
 #7

have you tried moving the data directory to some other drive, and starting bitcoin with datadir=d:\new directory\ ?

No, I reindexed it and it is working fine now.

"The difference between a castle and a prison is only a question of who holds the keys."
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
March 20, 2013, 02:46:03 AM
 #8

How old is your HDD? You could be dealing with a faulty disk drive.

Code:
LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.

It is about two years now. I can run some SMART tests.

Please do and report back.

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 02:52:01 AM
 #9

How old is your HDD? You could be dealing with a faulty disk drive.

Code:
LevelDB read failure: IO error: C:\Users\User\AppData\Roaming\Bitcoin\chainstate\041412.sst: Could not create random access file.

It is about two years now. I can run some SMART tests.

Please do and report back.

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

I just ran a short offline which Completed without error.

None of the raw values for the monitored attributes looks odd.

I last ran the 2 hour long test 2,404 hours ago.

Think it is worth running?

Edit: Also perhaps a checkdsk /r is in order?

"The difference between a castle and a prison is only a question of who holds the keys."
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
March 20, 2013, 02:58:11 AM
 #10

...

Think it is worth running?

No, seems ok.


Edit: Also perhaps a checkdsk /r is in order?

Give it a go, I assumed you already tried that.

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 03:07:13 AM
 #11

...

Think it is worth running?

No, seems ok.


Edit: Also perhaps a checkdsk /r is in order?

Give it a go, I assumed you already tried that.

Ok thanks, will run that tonight. So it is likely to be an HD issue I guess rather than client issue as nobody has reported it?

"The difference between a castle and a prison is only a question of who holds the keys."
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
March 20, 2013, 03:16:47 AM
 #12

...

Think it is worth running?

No, seems ok.


Edit: Also perhaps a checkdsk /r is in order?

Give it a go, I assumed you already tried that.

Ok thanks, will run that tonight. So it is likely to be an HD issue I guess rather than client issue as nobody has reported it?

Yes sir, working fine here on an SSD drive at breathtaking speeds  Smiley


BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
inglian
Newbie
*
Offline Offline

Activity: 23


View Profile
March 20, 2013, 01:10:21 PM
 #13

Same problem, immediately upon upgrading from bitcoin-0.8.0rc1-win32 to 0.8.1, on Win7-64.

Chose Cancel. The .sst file referenced did not exist, but no problem creating the .sst file with Cygwin "touch". Deleted the .sst file I had created, restarted Bitcoin-Qt, ran fine the second time, no further mention of .sst files in the debug.log. 2-month old SATA laptop drive with no problems.

Code:
Bitcoin version v0.8.1-beta (2013-03-17 15:35:36 -0400)
Using OpenSSL version OpenSSL 1.0.1c 10 May 2012
Startup time: 2013-03-20 12:52:37
Default data directory C:\Users\username\AppData\Roaming\Bitcoin
Used data directory C:\Users\username\AppData\Local\LargeDB\Bitcoin
Using 4 threads for script verification
init message: Verifying wallet integrity...
dbenv.open LogDir=C:\Users\username\AppData\Local\LargeDB\Bitcoin\database ErrorFile=C:\Users\username\AppData\Local\LargeDB\Bitcoin\db.log
Bound to [::]:8333
Bound to 0.0.0.0:8333
init message: Loading block index...
Opening LevelDB in C:\Users\username\AppData\Local\LargeDB\Bitcoin\blocks\index
Opened LevelDB successfully
Opening LevelDB in C:\Users\username\AppData\Local\LargeDB\Bitcoin\chainstate
Opened LevelDB successfully
LoadBlockIndex(): last block file = 14
LoadBlockIndex(): last block file: CBlockFileInfo(blocks=789, size=119258104, heights=225479..226267, time=2013-03-12..2013-03-17)
LoadBlockIndex(): transaction index disabled
LoadBlockIndex(): hashBestChain=00000000000002e60135b76ddd31d727f4ca44c28f142e85ff38c199b1a098e8  height=226267 date=2013-03-17 02:17:42
init message: Verifying block database integrity...
Verifying last 288 blocks at level 3
LevelDB read failure: IO error: C:\Users\username\AppData\Local\LargeDB\Bitcoin\chainstate\013292.sst: Could not create random access file.
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 20, 2013, 05:51:10 PM
 #14

Ran chkdsk /r overnight. It didn't detect any bad blocks, bad file records, or unindexed files. It did discover free space marked as allocated in the volume bitmap and it did clean up unused index entries/security descriptors.

"The difference between a castle and a prison is only a question of who holds the keys."
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 22, 2013, 05:13:37 AM
 #15

I ran a long SMART test which took 2+ hours. I says the drive is in perfect health. So no explanation really for the error as far as I can tell.

"The difference between a castle and a prison is only a question of who holds the keys."
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
March 22, 2013, 03:26:52 PM
 #16

I ran a long SMART test which took 2+ hours. I says the drive is in perfect health. So no explanation really for the error as far as I can tell.

I think the issue wasn't on your part, instead with the recent Bitcoin 0.8.1 reference client. Developers have tweaked DB parameters in order to comply with older 0.7 client limitations and it seems like LevelDB started complaining. It only affects 0.8.0 to 0.8.1 upgrade. Solution is given by @inglian a few posts up.

Hope it helps.

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
keystroke
Hero Member
*****
Offline Offline

Activity: 842


advocate of a cryptographic attack on the globe


View Profile
March 23, 2013, 02:47:44 AM
 #17

I ran a long SMART test which took 2+ hours. I says the drive is in perfect health. So no explanation really for the error as far as I can tell.

I think the issue wasn't on your part, instead with the recent Bitcoin 0.8.1 reference client. Developers have tweaked DB parameters in order to comply with older 0.7 client limitations and it seems like LevelDB started complaining. It only affects 0.8.0 to 0.8.1 upgrade. Solution is given by @inglian a few posts up.

Hope it helps.

Thanks, that makes sense! It works well now Smiley Something like this should be included in the release notes though. (Weird however because the issue didn't happen the first time I opened the client after the upgrade.)

"The difference between a castle and a prison is only a question of who holds the keys."
maxmint
Hero Member
*****
Offline Offline

Activity: 700



View Profile
March 31, 2013, 09:05:06 AM
 #18

I'm on a Mac, running bitcoin-qt v0.8.1-beta. I get the same error:
"Error opening block database. Do you want to rebuild the block database now?"

This is from my log file:

Quote
Bitcoin version v0.8.1-beta (2013-03-17 15:35:36 -0400)
Using OpenSSL version OpenSSL 1.0.1c 10 May 2012
Startup time: 2013-03-31 08:58:46
Default data directory /Users/max/Library/Application Support/Bitcoin
Used data directory /Users/max/Library/Application Support/Bitcoin
Using 8 threads for script verification
init message: Verifying wallet integrity...
dbenv.open LogDir=/Users/max/Library/Application Support/Bitcoin/database ErrorFile=/Users/max/Library/Application Support/Bitcoin/db.log
Bound to [::]:8333
Bound to 0.0.0.0:8333
init message: Loading block index...
Opening LevelDB in /Users/max/Library/Application Support/Bitcoin/blocks/index
Opened LevelDB successfully
Opening LevelDB in /Users/max/Library/Application Support/Bitcoin/chainstate
Opened LevelDB successfully
LoadBlockIndex(): last block file = 50
LoadBlockIndex(): last block file: CBlockFileInfo(blocks=699, size=126642116, heights=228135..228833, time=2013-03-26..2013-03-30)
LoadBlockIndex(): transaction index disabled
LoadBlockIndex(): hashBestChain=000000000000026e424ea170da0ba79e671e081b2c0ee5e389def9d8b4724a75  height=228833 date=2013-03-30 23:08:49
init message: Verifying block database integrity...
Verifying last 288 blocks at level 3
LevelDB read failure: Corruption: block checksum mismatch

The essential part seems to be this: "LevelDB read failure: Corruption: block checksum mismatch"

Anyone knows what's going on?

My PGP-Key: 462D02D8
Verify my messages using keybase: https://keybase.io/maxmint
maxmint
Hero Member
*****
Offline Offline

Activity: 700



View Profile
March 31, 2013, 06:50:20 PM
 #19

It's been a few hours now  and I tried to open my bitcoin-qt client again. It's working now without any errors.
I'm on a brand new iMac, the blockchain is on a SSD and I just checked the disk integrity, everything is good.

So strange, I just don't know what was causing this.

My PGP-Key: 462D02D8
Verify my messages using keybase: https://keybase.io/maxmint
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
March 31, 2013, 09:46:10 PM
 #20

It's been a few hours now  and I tried to open my bitcoin-qt client again. It's working now without any errors.
I'm on a brand new iMac, the blockchain is on a SSD and I just checked the disk integrity, everything is good.

So strange, I just don't know what was causing this.

Please post the issue on Github so developers can have a look at it.

https://github.com/bitcoin/bitcoin/issues/new

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
Pages: [1] 2 3 4 5 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!