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

0 votes

I am not able to create a new account in geth. I entered into geth console using the following command:

geth attach http://127.0.0.1:8543

Output:

Welcome to the Geth JavaScript console!
instance: Geth/v1.8.18-stable-58632d44/linux-amd64/go1.10.4
 modules: eth:1.0 net:1.0 rpc:1.0 web3:1.0
> eth.accounts
[]

Now when I am trying to create a new account, I am facing error as mentioned below:

> personal.newAccount('seed')
Error: The method personal_newAccount does not exist/is not available
Jan 17 in Blockchain by digger
• 27,630 points
155 views

1 answer to this question.

0 votes

personal.newAccount() is not a default geth method. This method is of API used for geth. For this command to work, you will have to include the APIs while starting the Blockchain. Try this:

geth --datadir ./myDataDir --networkid 1114 console 2 --rpc --rpcport 8543 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --rpcapi "eth,net,web3,personal,miner"

Now, you should be able to to create a new account

$ geth attach http://127.0.0.1:8543

> personal.newAccount('seed')
"0x103d162658783148bdf241db6ae57c02edcc3dab"
answered Jan 17 by Omkar
• 67,290 points

Related Questions In Blockchain

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,290 points
23 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 84 views
0 votes
1 answer

Unable to create a Mist connection to a private Ethereum Blockchain.

You could do the following: 1. Start another ...READ MORE

answered Jul 26, 2018 in Blockchain by Perry
• 17,010 points
37 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 309 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
125 views
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,290 points
82 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,290 points
39 views