Bitcoin Forum
April 23, 2024, 10:38:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Database error: DB_RUNRECOVERY: Fatal error, run database recovery  (Read 18105 times)
farmer_boy (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
November 28, 2010, 10:59:38 PM
 #1

I get the following scary message in my log:

************************
EXCEPTION: 22DbRunRecoveryException       
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery       
bitcoin in AppInit()


I already tried db4.7_dump <the only file existing in the .bitconf/database directory, but I got a format error there.

Solution?

"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713911888
Hero Member
*
Offline Offline

Posts: 1713911888

View Profile Personal Message (Offline)

Ignore
1713911888
Reply with quote  #2

1713911888
Report to moderator
1713911888
Hero Member
*
Offline Offline

Posts: 1713911888

View Profile Personal Message (Offline)

Ignore
1713911888
Reply with quote  #2

1713911888
Report to moderator
1713911888
Hero Member
*
Offline Offline

Posts: 1713911888

View Profile Personal Message (Offline)

Ignore
1713911888
Reply with quote  #2

1713911888
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12878


View Profile
November 28, 2010, 11:05:25 PM
 #2

Try deleting your blkindex.dat and blk*.dat files.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
farmer_boy (OP)
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
November 28, 2010, 11:19:33 PM
 #3

Try deleting your blkindex.dat and blk*.dat files.
I mv'ed the file under database and afterwards everything also seemed to be fine (as in the wallet still exists). What is the actual consequence of me moving that file? Or what is stored in that file?

I can move it back if needed, of course. It is 9.6MB.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12878


View Profile
November 28, 2010, 11:32:24 PM
 #4

What is the actual consequence of me moving that file? Or what is stored in that file?

It contains journaling information for the block database files (blkindex.dat and blk*.dat).

It's possible that deleting that could damage the block database. I recommend deleting the other block database files, too.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
bitcoinex
Sr. Member
****
Offline Offline

Activity: 350
Merit: 252


probiwon.com


View Profile WWW
November 30, 2010, 03:39:22 AM
 #5

FIRST - BACKUP!111

New bitcoin lottery: probiwon.com
- Moжeт, ты eщё и в Heвидимyю Pyкy Pынкa вepyeшь? - Зaчeм жe вepoвaть в тo, чтo мoжнo нaблюдaть нeпocpeдcтвeннo?
imanikin
Hero Member
*****
Offline Offline

Activity: 702
Merit: 503



View Profile
December 31, 2010, 10:04:59 PM
 #6

Is it known what causes this error? Is it possible that it would happen when mine and another machine finish calculating the same block at the same time and deadlock the db somehow?

(I guess, it's just coincidence, but so far, the only time i got this error, which corrupted my db, was exactly on the day that bitcoin calculator predicted that i would calculate another block. I mean almost to the hour...) Huh

After deleting the suggested files, B started working again...

theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12878


View Profile
January 01, 2011, 12:27:42 AM
 #7

(I guess, it's just coincidence, but so far, the only time i got this error, which corrupted my db, was exactly on the day that bitcoin calculator predicted that i would calculate another block. I mean almost to the hour...) Huh

It must be a coincidence, since that calculation is purely an estimate. It would be very rare for it to be accurate to an hour.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
imanikin
Hero Member
*****
Offline Offline

Activity: 702
Merit: 503



View Profile
January 01, 2011, 03:02:30 AM
 #8

It must be a coincidence, since that calculation is purely an estimate. It would be very rare for it to be accurate to an hour.

Thank you for your time and help. So, it's not known yet what causes this error, and how to prevent it?

What are the other block database files you mentioned, which i should delete, even though Bitcoin seems to be working for now?

theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12878


View Profile
January 01, 2011, 04:18:23 AM
 #9

So, it's not known yet what causes this error, and how to prevent it?

It's probably caused by the normal causes of file corruption: antivirus software, a failing disk, shutting down your computer improperly, etc.

Quote
What are the other block database files you mentioned, which i should delete, even though Bitcoin seems to be working for now?

Don't delete anything if it's working.

The first thing you should try for all Bitcoin database problems is deleting everything in the data directory except wallet.dat, debug.log, and bitcoin.conf (if it exists). All of the other files can be safely regenerated. (Debug.log is not necessary, but it might be helpful to have it later.)

If this problem happens repeatedly, and you're not getting errors in other programs, it could be a bug in Bitcoin. Post details in that case.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
jago25_98
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
March 27, 2011, 11:56:12 PM
 #10

I have the same problem. I can only get bitcoin to run if I delete the ~/.bitcoin/database directory but if I do that my balance is zero!

I can't see how my wallet.dat backup can help me...?

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
randomproof
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
April 01, 2011, 04:55:36 PM
 #11

I get the following scary message in my log:

************************
EXCEPTION: 22DbRunRecoveryException       
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery       
bitcoin in AppInit()


I already tried db4.7_dump <the only file existing in the .bitconf/database directory, but I got a format error there.

Solution?



Let me guess, you are running the version of bitcoin that came in the office debian repo?  That version is build with db_4.8 where are the version from the www.bitcoin.org is build with db_4.7.  The database formats are not compatible.  Just delete all the files in the data folder execpt for wallet.dat and it should run, but your client will have to download the whole block chain again.

Donations to me:   19599Y3PTRF1mNdzVjQzePr67ttMiBG5LS
jago25_98
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
April 01, 2011, 07:31:29 PM
 #12

My output is:

Code:
j@rv:~/.bitcoin$ bitcoin server starting


************************
EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in AppInit()

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery

Code:
j@rv:~/.bitcoin$ ls -R
.:
addr.dat  bitcoin.conf  bk  blk0001.dat  blkindex.dat  database  db.log  debug.log  wallet.dat

./bk:
database  __db.001  __db.002  __db.003  __db.004  __db.005  __db.006

./bk/database:
log.0000000001

./database:
log.0000000044
j@rv:~/.bitcoin$

The only way I can get the daemon to start is by removing ./database/log.0000000044 but then my balance becomes zero.

It's probably because the server didn't shutdown properly. But wallet.dat is backed up and ok. There's a few thousand bitcoins at stake here... need support...

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12878


View Profile
April 02, 2011, 05:31:42 AM
 #13

Try moving all files and directories except wallet.dat somewhere else. Then allow Bitcoin to re-download the blocks.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
jago25_98
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
April 11, 2011, 10:20:08 PM
 #14

Thanks for the suggestion... but it results in a zero balance (!)

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12878


View Profile
April 12, 2011, 11:53:30 AM
 #15

Thanks for the suggestion... but it results in a zero balance (!)

Wait for Bitcoin to download the blocks again.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
fetokun
Full Member
***
Offline Offline

Activity: 210
Merit: 100


Presale is live!


View Profile
May 05, 2011, 09:45:08 AM
 #16

Thanks for the suggestion... but it results in a zero balance (!)

I had the same problem.
just removed (after a backup of course) the file "log.0000000004" inside the database folder and it was OK.

kept my balance alright

joulesbeef
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


moOo


View Profile
July 21, 2011, 10:18:19 PM
 #17

help!

I just got that error today... tried deleting everything but wallet.dat and still get the same error.

reinstalled bitcoin.. started it up.. just fine.. copied over wallet.dat and same error. So is my wallet screwed?

mooo for rent
ama
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile WWW
September 02, 2011, 11:45:42 PM
 #18

help!

I just got that error today... tried deleting everything but wallet.dat and still get the same error.

reinstalled bitcoin.. started it up.. just fine.. copied over wallet.dat and same error. So is my wallet screwed?

Any solution for that?  I'm having the same problem.

ArtForz
Sr. Member
****
Offline Offline

Activity: 406
Merit: 257


View Profile
September 03, 2011, 01:49:10 PM
 #19

If you still get that error after deleting everything but wallet.dat (that includes the /database/log.* files)... yeah, you're probably screwed.
Last resort, iirc in the dev section someone posted code to pull anything that looks like a privkey out of a corrupt wallet.dat, then you can 'simply' inject them into a fresh wallet on a bitcoin with the privkey import/export patch and finally do a -rescan.

bitcoin: 1Fb77Xq5ePFER8GtKRn2KDbDTVpJKfKmpz
i0coin: jNdvyvd6v6gV3kVJLD7HsB5ZwHyHwAkfdw
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1233


May Bitcoin be touched by his Noodly Appendage


View Profile
September 05, 2011, 07:03:20 PM
 #20

As kojko proposed in another thread, you can send your wallet to someone savvy you trust
I can try if you want, I am currently developing pywallet so I know what I can try

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Pages: [1] 2 »  All
  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!