Bitcoin Forum
May 06, 2024, 06:33:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Restoring wallet.dat on bitcoind Ubuntu  (Read 1097 times)
Electra (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 05, 2014, 11:13:57 PM
 #1

Hi,
Im having issues with restoring my wallet.dat.
I only copied a "raw" wallet.dat before reinstalling the system so after reinstalling bitcoind,I copied my wallet.dat to ~/.bitcoin/ folder.
However I keep on getting this error:

bitcoin server starting
root@Alphaprod_44:~#

************************
EXCEPTION: NSt8ios_base7failureE
CDataStream::read() : end of data
bitcoin in AppInit()

terminate called after throwing an instance of 'std::ios_base::failure'
  what():  CDataStream::read() : end of data


I've already tried deleting all the files in ~/.bitcoin/ but I still get the same error.
did you ever go through this kind of error?
Can someone help me?
I dont remember if the wallet is encrypted (and if so,I use the same passphrase but I dont see how/where to type it for the moment).
Im even starting to doubt if my wallet isnt corrupted...
thanks!
1714977217
Hero Member
*
Offline Offline

Posts: 1714977217

View Profile Personal Message (Offline)

Ignore
1714977217
Reply with quote  #2

1714977217
Report to moderator
1714977217
Hero Member
*
Offline Offline

Posts: 1714977217

View Profile Personal Message (Offline)

Ignore
1714977217
Reply with quote  #2

1714977217
Report to moderator
1714977217
Hero Member
*
Offline Offline

Posts: 1714977217

View Profile Personal Message (Offline)

Ignore
1714977217
Reply with quote  #2

1714977217
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714977217
Hero Member
*
Offline Offline

Posts: 1714977217

View Profile Personal Message (Offline)

Ignore
1714977217
Reply with quote  #2

1714977217
Report to moderator
1714977217
Hero Member
*
Offline Offline

Posts: 1714977217

View Profile Personal Message (Offline)

Ignore
1714977217
Reply with quote  #2

1714977217
Report to moderator
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1028



View Profile WWW
February 07, 2014, 03:35:47 AM
 #2

You should completely rename the .bitcoin hidden directory in your home, then start up Bitcoin-Qt. Bitcoin then should make a new .bitcoin directory with a blank wallet and start downloading the blockchain. If this works, then close Bitcoin and put your backup wallet.dat in that directory. If you get the error again, your wallet file is corrupted.

You can attempt to recover the wallet.dat file in-place by starting bitcoin-qt with the -salvagewallet command-line option, but it would be better to locate an uncorrupted wallet backup.
Electra (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 08, 2014, 01:51:22 AM
 #3

You should completely rename the .bitcoin hidden directory in your home, then start up Bitcoin-Qt. Bitcoin then should make a new .bitcoin directory with a blank wallet and start downloading the blockchain. If this works, then close Bitcoin and put your backup wallet.dat in that directory. If you get the error again, your wallet file is corrupted.

You can attempt to recover the wallet.dat file in-place by starting bitcoin-qt with the -salvagewallet command-line option, but it would be better to locate an uncorrupted wallet backup.
Thank you.
Actually Im working on a dedicated server with ubuntu.
I moved the .bitcoin folder and and reinstalled bitcoind (with --purge).Now I'm not getting any errors.But I have to waith until it synchs.
I will let you know.Im affraid my wallet is corrupted anyway...
But first of all, THANK YOU.
Smiley
Electra (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 08, 2014, 02:20:37 AM
 #4

Hi again,
Now I'm having a "timeoffset" issue.Balance is still showing 0.
bitcoind getinfo
{
    "version" : 80600,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 138046,
   "timeoffset" : 2,
    "connections" : 16,
    "proxy" : "",
    "difficulty" : 1690895.80305239,
    "testnet" : false,
    "keypoololdest" : 1373767421,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

Never seen that before.I googled it and there is nothing about it.
It may have to do with peer time and the block not getting validated.
I may also be wrong...
Do you have any idea?
Or even places where to ask?
Or maybe,should I post it on github?
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1028



View Profile WWW
February 08, 2014, 07:45:19 AM
 #5

Your computer time needs to be within two hours of block times, and block times need to be within two hours of network consensus time. This likely means your computer's real-time clock is set to local time instead of UTC for linux, or your timezone is set incorrectly.
Electra (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 09, 2014, 02:35:31 AM
 #6

Your computer time needs to be within two hours of block times, and block times need to be within two hours of network consensus time. This likely means your computer's real-time clock is set to local time instead of UTC for linux, or your timezone is set incorrectly.
Thanks again.
The server was set to CET time so I changed it to UTC.
Bitcoind kept on showing -2 timeoffset.
I stopped the server,emptied ~/.bitcoin folder and copied back the wallet.
Now it seems to be working.
Im waiting for the blockchain to sync.
Thank you for your help!
fcmatt
Legendary
*
Offline Offline

Activity: 2072
Merit: 1001


View Profile
February 09, 2014, 02:39:18 AM
 #7

As root run ntpdate time.apple.com to get accurate time.
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!