[Resolved] Power failure again, dash-qt problems...

matthew1820

New Member
Mar 29, 2015
15
7
3
Another power glitch. I had a similar situation in my recent thread:

https://dashtalk.org/threads/bus-error-running-dash-qt-resolved.5421/

I did each of the steps recommended there:

I rebooted with a forced fsck; ran dash-qt with -reindex; removed mncahe.dat and peers.dat...
Finally, renamed wallet.dat and got it to open with a new wallet, then tried to open with a backup wallet, which fails.

I didn't document every step I did or the results, but at this point this is the error it's throwing when trying to open with the backup wallet:
Code:
A fatal error occurred. Dash can no longer continue safely and will quit.

EXCEPTION: St13runtime_error      
CWalletDB::ListAccountCreditDebit() : cannot create DB cursor      
dash in Runaway exception
With the virgin new wallet it opens normally and syncs up.

So, I did save a number of backup copies of this wallet, though not in several weeks, since I only ever created one address, and have done nothing with it but receive mining payouts to that address.

All the backups were made under the previous version. I'm currently trying to run 0.11.2.23, though I have a copy of the old version if needed. I'm running under Mint 17.1 Mate edition.

I'm thinking about erasing everything so dash-qt will be running for the first time and re-create all its files before copying in one of the backup wallet.dat files, but I'd like some input before I go any further.

Clearly a UPS is in my future... <sigh>

Help, please?
 

moli

Grizzled Member
Aug 5, 2014
3,255
1,830
1,183
Another power glitch. I had a similar situation in my recent thread:

https://dashtalk.org/threads/bus-error-running-dash-qt-resolved.5421/

I did each of the steps recommended there:

I rebooted with a forced fsck; ran dash-qt with -reindex; removed mncahe.dat and peers.dat...
Finally, renamed wallet.dat and got it to open with a new wallet, then tried to open with a backup wallet, which fails.

I didn't document every step I did or the results, but at this point this is the error it's throwing when trying to open with the backup wallet:
Code:
A fatal error occurred. Dash can no longer continue safely and will quit.

EXCEPTION: St13runtime_error     
CWalletDB::ListAccountCreditDebit() : cannot create DB cursor     
dash in Runaway exception
With the virgin new wallet it opens normally and syncs up.

So, I did save a number of backup copies of this wallet, though not in several weeks, since I only ever created one address, and have done nothing with it but receive mining payouts to that address.

All the backups were made under the previous version. I'm currently trying to run 0.11.2.23, though I have a copy of the old version if needed. I'm running under Mint 17.1 Mate edition.

I'm thinking about erasing everything so dash-qt will be running for the first time and re-create all its files before copying in one of the backup wallet.dat files, but I'd like some input before I go any further.

Clearly a UPS is in my future... <sigh>

Help, please?
Can you dump the private key from that one address?
 

splawik21

Yeah, it's me....
Dash Core Group
Foundation Member
Dash Support Group
Apr 8, 2014
1,971
1,339
1,283
Have u tried to atart with -salvagewallet parameter?
 

moli

Grizzled Member
Aug 5, 2014
3,255
1,830
1,183
If he uses his old backup and dump the privkey, he can get all his coins back, because all the coins have gone into that one address.
 
  • Like
Reactions: splawik21

splawik21

Yeah, it's me....
Dash Core Group
Foundation Member
Dash Support Group
Apr 8, 2014
1,971
1,339
1,283
moli I agree, but the question is why this happened? Wallet corrupted?
 
  • Like
Reactions: noobtrader

noobtrader

Active Member
Mar 27, 2015
188
97
103
seem wallet.dat corrupt, maybe should try running old dash wallet with old wallet. dat to dumpprivkey.
i myself save multiple copy of wallet.dat and print dumprivkey on paper at least 1.
 
  • Like
Reactions: buster and moli

splawik21

Yeah, it's me....
Dash Core Group
Foundation Member
Dash Support Group
Apr 8, 2014
1,971
1,339
1,283
he needs to dump the privkey and bring it to new wallet..... UdjinM6 can you help here?
 
  • Like
Reactions: noobtrader

matthew1820

New Member
Mar 29, 2015
15
7
3
Can you dump the private key from that one address?
Not until I can load the client far enough to get to the user interface, unless there's a command line option to trigger it. How is it done, please?

Have u tried to atart with -salvagewallet parameter?
All right, this gives considerable progress: It spent a bunch of time reindexing then loaded up what looks to be the data from one of my backup wallet.dat files. The address I've been using is there and my (small) balance is shown along with the transaction history.

The only glitch, I think, is that the address shows up in parenthesis and greyed out in the list of transactions on the summary page and the transactions page, and does NOT show up in the list of receiving addresses accessed from the File menu.

Is that a problem, and can it be corrected?

he needs to dump the privkey and bring it to new wallet.....
I'd like to know how to do this, plus print out the key pairs for physical preservation and/or create a paper wallet. Pointers or guidance, please?

Thank you for the instant response. I appreciate that very much.

M.
 

UdjinM6

Official Dash Dev
Dash Core Group
May 20, 2014
3,639
3,537
1,183
matthew1820

If you finally loaded wallet fine open Tools -> Debug console end enter

Code:
dumpprivkey YourAddressHereblablablablablablablabla
That should give you your private key (keep it safe!)

If you want that address back into Receiving addresses now enter

Code:
importprivkey YourPrivateKeyYouGotInPreviousOutputblablablablablablablablablabla LabelYouWantForThatAddress
 

noobtrader

Active Member
Mar 27, 2015
188
97
103
btw this is script i create, maybe can be useful, privkey.txt will contain all the privkey that has coin inside i think...

============
dump priv key
============

./dashd listaddressgroupings >> test.txt

awk '/"/' test.txt >btest.txt #only print those between symbol

cat btest.txt | sed 's/"//g' >ctest.txt #remove symbol

cat ctest.txt | sed 's/,//g' >dtest.txt #remove symbol

cat dtest.txt | sed 's/ //g' >etest.txt #remove space

awk '/./' etest.txt >> ftest.txt #remove empty


awk < ftest.txt '{ print "./dashd dumpprivkey " $1" " $2" " $3" " $4 }' | "/bin/sh" >>privkey.txt

============
import privkey.txt
============

awk < privkey.txt '{ print "./dashd importprivkey " $1" " $2" " $3" " $4 }' | "/bin/sh" >privkey1.txt
 

splawik21

Yeah, it's me....
Dash Core Group
Foundation Member
Dash Support Group
Apr 8, 2014
1,971
1,339
1,283
If you see the grey amounts start the wallet with -zapwallettxes that should help.

Try to dumpprivkey too and let us know at what point are you.
 

thelazier

Active Member
Jan 5, 2015
240
184
103
Thailand
Dash Address
Xreiza1qGJMT5BpW6BDtRJqwtcBSxGwWYN
btw this is script i create, maybe can be useful, privkey.txt will contain all the privkey that has coin inside i think...

============
dump priv key
============

./dashd listaddressgroupings >> test.txt

awk '/"/' test.txt >btest.txt #only print those between symbol

cat btest.txt | sed 's/"//g' >ctest.txt #remove symbol

cat ctest.txt | sed 's/,//g' >dtest.txt #remove symbol

cat dtest.txt | sed 's/ //g' >etest.txt #remove space

awk '/./' etest.txt >> ftest.txt #remove empty


awk < ftest.txt '{ print "./dashd dumpprivkey " $1" " $2" " $3" " $4 }' | "/bin/sh" >>privkey.txt

============
import privkey.txt
============

awk < privkey.txt '{ print "./dashd importprivkey " $1" " $2" " $3" " $4 }' | "/bin/sh" >privkey1.txt
For dump priv key in 1 line command,
dash-cli listaddressgroupings |grep \", |cut -d '"' -f 2| awk '{ print "dash-cli dumpprivkey " $1}' |/bin/sh >> privkey.txt
 
  • Like
Reactions: noobtrader

matthew1820

New Member
Mar 29, 2015
15
7
3
Okay, looks like things are fixed.

I unlocked the wallet from the GUI. In Debug, I did dumpprivkey <address>, copied the pair to a file for preservation, and then importprivkey <privkey> <label>. The address showed back up in the receiving address list and all the transactions lists updated to show the Label, rather than the greyed out parenthetical address. Re-locked the wallet from the GUI.

I found the Clear Console button, so now my passphrase isn't sitting there in the clear. Thanks for the generous use of 'tooltips' on the controls!

Again I am so grateful for your kind help, folks.

Without a doubt there are many things more urgent and important requiring development, but I hope that hardening the process of managing the wallet.dat file against uncontrolled shut-downs can get some attention some day. Since I'm not solo mining, I could choose not to keep the client running all the time, but if I remember right, doing so contributes to the network?

Meanwhile, I've done without a UPS for too long. If I insist on running software that creates a lot of disk and network traffic, it's clear I can't just rely on Linux' basic robustness to protect me.

Again, thanks very much.

Peace,

M.