[Ethereum] Error “no key for given address or file” when unlocking coinbase account

accountsblockchaincoinbasego-ethereumjson-rpc

Using json-rpc eth_unlockAccount() method I can unlock everyone of my node accounts except coinbase. When trying to unlock coinbase account, geth responds with the message:

no key for given address or file.

I've bee reading Ethereum Wallet: error of no key for given address or file but I am not using Ethereum Wallet, but just json-rpc calls to geth node. Nevertheless I have restarted geth node, as recommended in the answer, but still the same error.

How can I unlock coinbase account? Why the error:

no key for given address or file.

P.S.: Trying to unlock the coinbase account directly with command line, same result:

$ geth --testnet --unlock 0x47978a69f410d0f61850c92acdb0d4c464d70937

Fatal: Failed to unlock account 0x47978a69f410d0f61850c92acdb0d4c464d70937 (no key for given address or file)

Best Answer

We were getting the same error and it turned out that there were two conflicting keyfiles. One in the default (~/.ethereum) and one in a custom location that we had specified using --datadir.

In the end it was just a case of cleaning up the scripts we were using to deploy the geth node to make sure that we consistently only used one or the other keystore (we went with the default in our case)

Once we had done that, the problem was solved.

Related Topic