Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fatal error 0.7.1 St13runtime_error CDB() can't open database file blkindex.dat error 22 #1969

Closed
PanderMusubi opened this Issue Oct 30, 2012 · 5 comments

Comments

Projects
None yet
3 participants

On Ubuntu 12.04 64-bit with bitcoint 0.7.1 I get this error:

EXCEPTION: St13runtime_error
CDB() : can't open database file blkindex.dat, error 22
bitcoin in Runaway exception

Please fix this or let me know about a workaround to access my bitcoins again.

Diapolo commented Oct 30, 2012

It would help, if you could show us more details via the debug.log before the exception.
Did the client crash before or did your PC crash while the client was running? Any strange things that happened before that error showed up the first time?

Version 0.6 also gave some similar error. Please see below part of debug.log. Let me know if you need more information.

Bitcoin version v0.6.3-beta (2012-06-19 16:44:55 -0400)
Default data directory /home/pander/.bitcoin
Loading addresses...
dbenv.open LogDir=/home/pander/.bitcoin/database ErrorFile=/home/pander/.bitcoin/db.log
Added 17082 addresses from 0.0.0.0: 0 tried, 1856 new
Loaded 1856 addresses
addresses 486ms
Loading block index...


EXCEPTION: 11DbException
Db::open: Invalid argument
bitcoin in Runaway exception

Bitcoin version v0.7.1-beta (2012-10-09 13:22:09 -0400)
Using OpenSSL version OpenSSL 0.9.8k 25 Mar 2009
Startup time: 2012-10-30 10:56:15
Default data directory /home/pander/.bitcoin
Used data directory /home/pander/.bitcoin
dbenv.open LogDir=/home/pander/.bitcoin/database ErrorFile=/home/pander/.bitcoin/db.log
Bound to [::]:8333
Bound to 0.0.0.0:8333
Loading block index...


EXCEPTION: St13runtime_error
CDB() : can't open database file blkindex.dat, error 22
bitcoin in Runaway exception

Diapolo commented Oct 30, 2012

It seems that your blockindex got corrupted somehow. You should make a backup of your wallet.dat and then clean your data-directory and only leave in the wallet.dat. This leads to a re-download of the block-chain, which can take a while though.

Yes, this workaround worked. It did not by the way for the problem I had with 0.6 a while back.

Please catch these fatal errors and provide a meaningful message for the end user. I can imagine that some users would really not know what to do. A small text and a link to a FAQ or troubleshoot manual would be required at least.

Fixing this would make the application more robust and not scare beginning users that might encounter it.

Owner

laanwj commented Nov 11, 2013

Closing this as there is no blkindex.dat anymore

@laanwj laanwj closed this Nov 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment