Not able to deploy smart contract to private network

0 votes

I am trying to deploy a smart contract. I have written the smart contract. To start the network, I used the following command.

geth --datadir="./dataDir" --port 30303 --rpc --rpcport 8545 --rpcaddr localhost --networkid 1114 --rpccorsdomain="*" --rpcapi "eth,web3"

then I run ’truffle deploy', I get the message:

Error deploying SimpleStorage:
Account does not exist or account balance too low Deploy failed.
Jan 18 in Blockchain by slayer
• 29,050 points
37 views

1 answer to this question.

0 votes

This could happen due to 3 possible reasons.

1. No account created

Solution: Create an account.

> personal.newAccount('<Enter seed phrase here>')

2. Account is locked

Solution: Unlock the account using the following command in geth console

personal.unlockAccount("<account_address>")

Enter the password when asked

3. Not enough ethers in account. 

Solution: Add more ethers, you can do this by mining.

> miner.start()
answered Jan 18 by Omkar
• 67,380 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Not able to create new account in geth for private ethereum network

Looks like the account you are trying ...READ MORE

answered Dec 6, 2018 in Blockchain by Omkar
• 67,380 points
105 views
0 votes
1 answer

Not able to send ethers in private ethereum network

Your account is locked by default due ...READ MORE

answered Jan 9 in Blockchain by Omkar
• 67,380 points
25 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
138 views
0 votes
1 answer
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 363 views
0 votes
1 answer

Not able to invoke a contract in Ethereum Private chain using geth

Hope this helps: contract mortal { /* ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 67,380 points
41 views
0 votes
1 answer

Not able to migrate contract in Truffle: Error: No network specified. Cannot determine current network

Make these entries in truffle.js file: module.exports = { ...READ MORE

answered Nov 29, 2018 in Blockchain by Omkar
• 67,380 points
113 views