[Ethereum] truffle migrate fails with Network state unknown, Error: account is locked

testrpctruffleweb3js

I'm trying to run the truffle demo on the ethereum testnet but truffle migrate fails with "Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: account is locked"

I'm running test net using the command

geth --testnet --rpc --rpcapi db,eth,net,web3,personal --cache=1024  --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303"

and then in another tab:

truffle console
web3.personal.newAccount('samplepassword')
web3.personal.unlockAccount(account hash, 'samplepassword', 15000)
migrate

I've tried using both testrpc and ethereum testnet, and have gotten the same account locked error both times.

Best Answer

Have you tried creating the new account straight from geth?.

geth attach
personal.newAccount(passphrase)
"0xb03c6008a4d3de476af9028167ddf285cd0bc397"
personal.unlockAccount("0xb03c6008a4d3de476af9028167ddf285cd0bc397")