Geth – Fixing personal.unlockAccount() Invalid JSON RPC Response

consolego-ethereum

It's launch of Geth:

geth --testnet --fast --rpc --verbosity 0

The start of interaction with console:

geth attach ipc:/.../geth.ipc

Console works great but when I inputs the following command:

personal.unlockAccount(eth.accounts[0], "psw", 0)

(different parameters: with/without duration, "eth.coinbase" or just adress name instead of eth.accounts[0], etc)

console is blocked for several minutes. At the same time Geth does not work for all sessions, RPC is disable. Finally it returns

Error: Invalid JSON RPC response: {"error": {"EOF":"EOF",
"code":-32603}, "id":11, "version":"2.0"}

Geth process is killed.

What is it?

Best Answer

You need to enable personal API on the command line:

   geth  --rpcapi eth,web3,personal,admin 

More info

However be aware that if you expose RPC socket to public Internet and personal API is exposed anybody can steal your Ether.