Bitcoin Forum
May 17, 2024, 07:45:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: error trying to import private key  (Read 1100 times)
wuzamarine (OP)
Sr. Member
****
Offline Offline

Activity: 264
Merit: 250

derp


View Profile
February 18, 2014, 04:16:01 AM
 #1

I am in a special situation where I need to import my private key credentials and basically restore a wallet to bitcoind. bitcoind is running and I do have an rpc user/pass and server=1 in the bitcoind.conf, but no matter what I do, when I try and import the key I get the following error.

root@coined:/home#  bitcoind importprivkey "5JxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxHjdCia9dt7" "root"
error: {"code":-4,"message":"Error adding key to wallet"}
Justin00
Legendary
*
Offline Offline

Activity: 910
Merit: 1000


★YoBit.Net★ 350+ Coins Exchange & Dice


View Profile
February 18, 2014, 04:29:37 AM
 #2

Did you unlock wallet first ?

wuzamarine (OP)
Sr. Member
****
Offline Offline

Activity: 264
Merit: 250

derp


View Profile
February 18, 2014, 04:36:21 AM
 #3

Did you unlock wallet first ?

No, there is no password or encryption to unlock. Unless bitcoind throws a lock on by default I don't know about.
wuzamarine (OP)
Sr. Member
****
Offline Offline

Activity: 264
Merit: 250

derp


View Profile
February 18, 2014, 04:39:43 AM
 #4

Did you unlock wallet first ?

No, there is no password or encryption to unlock. Unless bitcoind throws a lock on by default I don't know about.

nope

root@coined:/home# bitcoind walletpassphrase "" 1000
error: {"code":-15,"message":"Error: running with an unencrypted wallet, but walletpassphrase was called."}
Justin00
Legendary
*
Offline Offline

Activity: 910
Merit: 1000


★YoBit.Net★ 350+ Coins Exchange & Dice


View Profile
February 18, 2014, 04:41:17 AM
 #5

was looking on google quickly.. any chance the key is imported alrdy ?

wuzamarine (OP)
Sr. Member
****
Offline Offline

Activity: 264
Merit: 250

derp


View Profile
February 18, 2014, 11:24:12 AM
 #6

was looking on google quickly.. any chance the key is imported alrdy ?

It did import something, at one point the label 'dude' appeared (the label I was using) but the address was different and so was the private key. It's as though bitcoind said "well, you obviously want an address, no clue what you are doing with this one, we'll just make one up for you".

I have not been able to reproduce the step since with a new label 'dude2'.

Trying a different server now, maybe it's a local issue.
davidpbrown
Sr. Member
****
Offline Offline

Activity: 531
Merit: 260


Vires in Numeris


View Profile WWW
February 18, 2014, 06:35:56 PM
 #7

I think there's something about the qt or daemon that requires the .conf file exists with rpc port, otherwise it doesn't import.

Check that in ~/.bitcoin or wherever for your OS, that there is a bitcoin.conf and that it contains detail of the form:

rpcuser=wuzamarine
rpcpassword=randomstringhereaosudhaiosdubaohbnqld
rpcport=8332
daemon=1

฿://12vxXHdmurFP3tpPk7bt6YrM3XPiftA82s
Localbtcbuyer
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
February 18, 2014, 06:37:26 PM
 #8

Can you just import into another client (blockchain.info, or maybe multibit), then send to your address?
davidpbrown
Sr. Member
****
Offline Offline

Activity: 531
Merit: 260


Vires in Numeris


View Profile WWW
February 19, 2014, 09:01:14 PM
 #9

https://en.bitcoin.it/wiki/How_to_import_private_keys

> Bitcoin-QT does not enable its RPC interface by default. To enable it:

>   Close Bitcoin-QT and restart it with bitcoin-qt -server.

฿://12vxXHdmurFP3tpPk7bt6YrM3XPiftA82s
kroleg
Newbie
*
Offline Offline

Activity: 34
Merit: 0


View Profile
February 20, 2014, 08:58:32 AM
 #10

to solve this problem you should unlock your wallet first
softron
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
February 27, 2014, 06:42:02 PM
 #11

Try using another wallet like electrum

roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
February 27, 2014, 08:43:31 PM
 #12

indeed. Try to import those keys into another client...
seems strange if you did everything like it is explained above..

let us know what happend.

Smiley importing private keys is always a bit stressing Tongue isn't? Smiley
softron
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
February 28, 2014, 12:02:41 PM
 #13

Try
 
importprivkey <privkey> [label]

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!