I have set up a private network with Geth with the following command:
geth --datadir="PathToDatadir" --mine -minerthreads 2 -verbosity 3 -maxpeers 5 --ipcapi "admin,debug,eth,miner,net,personal,shh,txpool,web3" --ipcpath "geth.ipc" --port 30301 --rpc --rpcport 8101 --rpcapi eth,web3,personal --etherbase "e04fe31f4133f25ef3e5bfb39146edcf28724acd" --networkid 9990
So far so good.
I have developed a system of contracts using truffle and testrpc and am now trying to deploy this to multiple nodes. When running truffle migrate, i run into trouble:
Running migration: 1_initial_migration.js Replacing Migrations... Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: account is locked
I have configured truffle to send from an address I want (same one that is defined as etherbase) but the account is locked. There are multiple ways to unlock an account using Geth. The only way it seems to work for me is if I unlock the account like this:
geth --unlock "e04fe31f4133f25ef3e5bfb39146edcf28724acd" --password "fullPathtoTxtPasswordfile"
Does the account remain unlocked for future Geth invocations ? Unlocking through personal.unlockAccount("address","fullPathtoTxtPasswordfile") in the console is not working either. web3.accounts is also undefined.
So I seem to have succeeded in unlocking the accounts but truffle migrate is still giving me the account locked error. I have found similar problems with account unlocks but have not found a solution for my own specific problem.