Author

Topic: error reading wallet.dat (Read 3859 times)

newbie
Activity: 322
Merit: 0
December 16, 2015, 06:09:19 PM
#12
I replaced whole .Bitcoin directory. It still gives me "Error: wallet.dat corrupt, salvage failed" after --daemon and then -rescan flag.
However according to logs there are new kind of problem.

db.log
Code:
Page 8973: unaligned offset 2085 at page index 21
Page 8973: gap between items at offset 2096
Page 8973: gap between items at offset 2904
Page 8973: overlapping items at offset 3168
Page 8973: gap between items at offset 3184
Page 8973: overlapping items at offset 3207
Page 8973: gap between items at offset 3444
Page 8973: gap between items at offset 3812
Page 8973: gap between items at offset 4036
Page 8973: item order check unsafe: skipping
Page 8974: overlapping items at offset 2136
Page 8974: gap between items at offset 2140
Page 8974: overlapping items at offset 2175
Page 8974: gap between items at offset 4044
Page 8974: item order check unsafe: skipping
Page 13841: gap between items at offset 1776
Page 13841: gap between items at offset 2132
Page 13841: overlapping items at offset 3028
Page 13841: gap between items at offset 3036
Page 13841: overlapping items at offset 3047
Page 13841: gap between items at offset 3048
Page 13841: overlapping items at offset 3788
Page 13841: gap between items at offset 3812
Page 13841: overlapping items at offset 3819
Page 13841: gap between items at offset 3820
Page 13841: gap between items at offset 4024
Page 13841: item order check unsafe: skipping
wallet.dat: DB_VERIFY_BAD: Database verification failed
DB_LOGC->get: log record LSN 8153/356327: checksum mismatch
DB_LOGC->get: catastrophic recovery may be required
PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
process-private: unable to find environment
process-private: unable to find environment
file unknown has LSN 321/508796, past end of log at 1/28
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
Page 0: metadata page corrupted
Page 0: could not check metadata page
wallet.dat: DB_VERIFY_BAD: Database verification failed
file unknown has LSN 321/508796, past end of log at 1/1076
Commonly caused by moving a database from one database environment
to another without clearing the database LSNs, or by removing all of
the log files from a database environment
wallet.1450305254.bak: DB_VERIFY_BAD: Database verification failed

debug.log
Code:
2015-12-16 22:34:12 Default data directory /root/.Bitcoin
2015-12-16 22:34:12 Using data directory /root/.Bitcoin
2015-12-16 22:34:12 Using at most 125 connections (1024 file descriptors available)
2015-12-16 22:34:12 init message: Verifying wallet...
2015-12-16 22:34:12 dbenv.open LogDir=/root/.Bitcoin/database ErrorFile=/root/.Bitcoin/db.log
2015-12-16 22:34:14 ERROR: CDB() : error DB_RUNRECOVERY: Fatal error, run database recovery (-30973) opening database environment
2015-12-16 22:34:14 Moved old /root/.Bitcoin/database to /root/.Bitcoin/database.1450305254.bak. Retrying.
2015-12-16 22:34:14 dbenv.open LogDir=/root/.Bitcoin/database ErrorFile=/root/.Bitcoin/db.log
2015-12-16 22:34:15 Renamed wallet.dat to wallet.1450305254.bak
2015-12-16 22:34:15 Error: Salvage found errors, all data may not be recoverable.
2015-12-16 22:34:15 Salvage(aggressive) found no records in wallet.1450305254.bak.
2015-12-16 22:34:15 Error: wallet.dat corrupt, salvage failed
2015-12-16 22:34:15 Shutdown : In progress...
2015-12-16 22:34:16 StopNode()
2015-12-16 22:34:16 Flushed 0 addresses to peers.dat  3ms
2015-12-16 22:34:16 Shutdown : done
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 16, 2015, 05:28:08 AM
#11
Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.

This is backup when I tried to use "-zapwallettxes=2" flag.

Do you have any other backups or any idea why the backup could be corrupted as well as the normal wallet.dat?
As I said above:"I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash.". This may be a reason.
I have older backups. What if I replace whole ".Bitcoin" directory?

Well the server crashed, yes. Usually a file gets corrupted if data is accessed during the crash. I would not expect that happening with your live wallet.dat as well as your backup even if they are both on the same system. Unless you run automated backups and it crashed at the exact time the wallet.dat was due. It might help if you replace the whole dir, not sure. Maybe its not actually the wallet.dat files but something else. Replacing the entire dir might give some clues.
newbie
Activity: 322
Merit: 0
December 16, 2015, 05:11:17 AM
#10
Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.

This is backup when I tried to use "-zapwallettxes=2" flag.

Do you have any other backups or any idea why the backup could be corrupted as well as the normal wallet.dat?
As I said above:"I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash.". This may be a reason.
I have older backups. What if I replace whole ".Bitcoin" directory?
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 16, 2015, 04:56:45 AM
#9
Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.

This is backup when I tried to use "-zapwallettxes=2" flag.

Do you have any other backups or any idea why the backup could be corrupted as well as the normal wallet.dat?
newbie
Activity: 322
Merit: 0
December 16, 2015, 04:18:19 AM
#8
Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.

This is backup when I tried to use "-zapwallettxes=2" flag.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 16, 2015, 03:25:00 AM
#7
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect."
I have already tried to put "-rescan" flag - gives me the same result.
I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?

The backup might fix it or it might have the same issue.

Instead of -rescan try -zapwallettxes if the backup does not work.

If that does not work either, try -zapwallettxes=2 this will drop all meta data about transactions (labels, etc.) though.
Backup of wallet.dat does not help. I am even using your advices (-zapwallettxes, -zapwallettxes=2). I get new error:"Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in /root/.Bitcoin; if your balance or transactions are incorrect you should restore from a backup.
Error: Error loading wallet.dat: Wallet corrupted
".
Any other suggestions? What if I replace whole ".Bitcoin" folder by one week backup?
By the way there are these lines in "debug.log" of wallet:
...
015-12-15 22:30:50 init message: Loading wallet...
2015-12-15 22:30:52 Error reading wallet database: CPubKey corrupt
2015-12-15 22:30:54 Error reading wallet database: CPrivKey corrupt
2015-12-15 22:30:54 Error reading wallet database: CPrivKey corrupt
2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:55 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:57 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:58 Error reading wallet database: CPrivKey corrupt

...

Is this the original wallet file or the backup? It looks like the wallet.dat was corrupted and the private keys are damaged. Odd that it would happen with your live wallet.dat as well as with your backup.
hero member
Activity: 644
Merit: 500
December 16, 2015, 02:58:34 AM
#6
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect."
I have already tried to put "-rescan" flag - gives me the same result.
I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?

Find and Check your debug.log file (Help menu -> Debug window, then click the Open button), and search for the text "Error reading wallet database" which should have a more specific error message following it, Bitcoin Core is already smart enough to do an automatic re scan if it thinks the corruption is inside a transaction record.
newbie
Activity: 322
Merit: 0
December 15, 2015, 05:37:54 PM
#5
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect."
I have already tried to put "-rescan" flag - gives me the same result.
I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?

The backup might fix it or it might have the same issue.

Instead of -rescan try -zapwallettxes if the backup does not work.

If that does not work either, try -zapwallettxes=2 this will drop all meta data about transactions (labels, etc.) though.
Backup of wallet.dat does not help. I am even using your advices (-zapwallettxes, -zapwallettxes=2). I get new error:"Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in /root/.Bitcoin; if your balance or transactions are incorrect you should restore from a backup.
Error: Error loading wallet.dat: Wallet corrupted
".
Any other suggestions? What if I replace whole ".Bitcoin" folder by one week backup?
By the way there are these lines in "debug.log" of wallet:
...
015-12-15 22:30:50 init message: Loading wallet...
2015-12-15 22:30:52 Error reading wallet database: CPubKey corrupt
2015-12-15 22:30:54 Error reading wallet database: CPrivKey corrupt
2015-12-15 22:30:54 Error reading wallet database: CPrivKey corrupt
2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:54 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:55 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:57 Error reading wallet database: CPrivKey pubkey inconsistency
2015-12-15 22:30:58 Error reading wallet database: CPrivKey corrupt

...
newbie
Activity: 322
Merit: 0
December 15, 2015, 05:36:37 PM
#4
You can always try it.  BUT:
1. Make sure you have extra backups of both.
2. Don't actually REPLACE the old wallet.dat, just rename it to something else and use a COPY of the backup.  This way you will have the wallet.dat that is given you a problem now and a number of backups.
thanks for advice.
legendary
Activity: 4228
Merit: 1313
December 15, 2015, 12:52:04 PM
#3
You can always try it.  BUT:
1. Make sure you have extra backups of both.
2. Don't actually REPLACE the old wallet.dat, just rename it to something else and use a COPY of the backup.  This way you will have the wallet.dat that is given you a problem now and a number of backups.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
December 15, 2015, 12:51:23 PM
#2
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect."
I have already tried to put "-rescan" flag - gives me the same result.
I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?

The backup might fix it or it might have the same issue.

Instead of -rescan try -zapwallettxes if the backup does not work.

If that does not work either, try -zapwallettxes=2 this will drop all meta data about transactions (labels, etc.) though.
newbie
Activity: 322
Merit: 0
December 15, 2015, 11:28:50 AM
#1
My wallet was corrupted. Now when I am running the wallet (using "--daemon" flag) it says:"Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect."
I have already tried to put "-rescan" flag - gives me the same result.
I am using Ubuntu 14.04. Few days ago there was entire server crash or at least mysql crash. Anyway I have one week backup. What if I replace current "wallet.dat" by backuped "wallet.dat". Will this fix the wallet?
Jump to: