I am trying to sync Metamask accounts with a private geth installation.

I imported the account from MM and that shows on geth list but on eth.accounts nothing for that account. Any reason for this and how to correct?

Three accounts -

root@dockertest:/home/trevor/devnet# geth --datadir node1/ account list
INFO [11-27|22:26:31.833] Maximum peer count                       ETH=25 LES=0 total=25
Account #0: {2a7f4fa8000e6fc777e665bf83a866fb51508f95} keystore:///home/trevor/devnet/node1/keystore/UTC--2018-11-27T07-30-25.745358795Z--2a7f4fa8000e6fc777e665bf83a866fb51508f95
Account #1: {b04f9d894ac45b3ebc499fce1aaf8d7578a73e4d} keystore:///home/trevor/devnet/node1/keystore/UTC--2018-11-27T17-25-37.723858602Z--b04f9d894ac45b3ebc499fce1aaf8d7578a73e4d
Account #2: {3b79ccfce4e6fdeefd2f9dbc744b0dc10f632d6a} keystore:///home/trevor/devnet/node1/keystore/UTC--2018-11-27T22-02-27.478135343Z--3b79ccfce4e6fdeefd2f9dbc744b0dc10f632d6a

After starting node1 using geth --datadir node1/ ...

Two accounts -

root@dockertest:/home/trevor/devnet# geth  attach node1/geth.ipc
Welcome to the Geth JavaScript console!

instance: Geth/v1.8.18-stable-58632d44/linux-amd64/go1.10.4
coinbase: 0x2a7f4fa8000e6fc777e665bf83a866fb51508f95
at block: 4838 (Tue, 27 Nov 2018 22:19:40 UTC)
 datadir: /home/trevor/devnet/node1
 modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

> eth.accounts
["0x2a7f4fa8000e6fc777e665bf83a866fb51508f95", "0xb04f9d894ac45b3ebc499fce1aaf8d7578a73e4d"]
  • Does restart make a difference ? I.e. if you restart geth; does eth.acounts see new account ? – Shamit Verma Nov 28 '18 at 2:53
  • No. I ended up not using attach. That works. It is a workaround. It seems to not detect the correct keystore. – Trevor Lee Oakley Nov 28 '18 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.