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

issue PanderMusubi opened this issue on October 30, 2012
  1. PanderMusubi commented at 11:01 AM on October 30, 2012: none

    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.

  2. Diapolo commented at 1:35 PM on October 30, 2012: none

    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?

  3. PanderMusubi commented at 1:42 PM on October 30, 2012: none

    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

  4. Diapolo commented at 8:16 PM on October 30, 2012: none

    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.

  5. PanderMusubi commented at 8:53 AM on October 31, 2012: none

    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.

  6. laanwj commented at 4:59 PM on November 11, 2013: member

    Closing this as there is no blkindex.dat anymore

  7. laanwj closed this on Nov 11, 2013

  8. KolbyML referenced this in commit 437ea2d691 on Dec 5, 2020
  9. KolbyML referenced this in commit 692d053d91 on Dec 5, 2020
  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me