Bitcoin Forum
April 26, 2024, 07:26:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: error reading wallet.dat  (Read 3836 times)
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
December 15, 2015, 04:28:50 PM
 #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?
1714159606
Hero Member
*
Offline Offline

Posts: 1714159606

View Profile Personal Message (Offline)

Ignore
1714159606
Reply with quote  #2

1714159606
Report to moderator
1714159606
Hero Member
*
Offline Offline

Posts: 1714159606

View Profile Personal Message (Offline)

Ignore
1714159606
Reply with quote  #2

1714159606
Report to moderator
1714159606
Hero Member
*
Offline Offline

Posts: 1714159606

View Profile Personal Message (Offline)

Ignore
1714159606
Reply with quote  #2

1714159606
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
December 15, 2015, 05: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.

Im not really here, its just your imagination.
cr1776
Legendary
*
Offline Offline

Activity: 4018
Merit: 1299


View Profile
December 15, 2015, 05: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.
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
December 15, 2015, 10: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.
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
December 15, 2015, 10:37:54 PM
Last edit: December 15, 2015, 10:58:44 PM by Green Lantern
 #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

...
avw1982
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500



View Profile
December 16, 2015, 07: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.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
December 16, 2015, 08: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.

Im not really here, its just your imagination.
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
December 16, 2015, 09: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.
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
December 16, 2015, 09: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?

Im not really here, its just your imagination.
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
December 16, 2015, 10: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?
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
December 16, 2015, 10: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.

Im not really here, its just your imagination.
Green Lantern (OP)
Newbie
*
Offline Offline

Activity: 322
Merit: 0


View Profile
December 16, 2015, 11:09:19 PM
Last edit: December 16, 2015, 11:21:25 PM by Green Lantern
 #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
Pages: [1]
  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!