4

Trying to connect Ethereum Wallet with the private test net, but facing issues.

Ran this command:

geth --genesis /home/cgen.json --datadir '/home/systemname/Desktop/node2/geth.ipc ~/.ethereum/geth.ipc' --networkid 12345 --nodiscover --port 30302 --verbosity 0 console

And then launched Ethereum Wallet.

I got the error ERROR: Could not open database open/home/systemname/.ethereum/chaindata/LOCK:Permission Denied

enter image description here

Running the above mentioned but getting error .

1
  • Try running geth with sudo. @jassu
    – alper
    Feb 14, 2018 at 11:19

1 Answer 1

1

EDIT 07/06/2016

The problem you are getting with the chaindata being locked is because you have started one instance of geth and then Ethereum Wallet is trying to start another instance of `geth.

Before/when/after you get the error, in another terminal window, type

ps -ef | grep geth 

If you see two instances of geth, this is the cause of your locking issue.

The cause of this is that Ethereum Wallet tries to communicate with any existing geth instance by using the IPC file and this is hardcoded in Ethereum Wallet to be ~/.ethereum/geth.ipc . When Ethereum Wallet is unable to detect an existing geth instance, it will attempt to start a new geth instance, and this is when you have the locking issue.

To fix this issue, see the usage of the --ipcpath ~/.ethereum/geth.ipc command line parameter below.


Try the following:

  1. Create a password file

    echo "testpassword" > /tmp/passwordfile
    
  2. Create a new account using a temp datadir

    geth --dev --datadir /tmp/devdatadir --password /tmp/passwordfile account new
    
  3. Run geth in mining mode

    geth --dev --datadir /tmp/devdatadir --mine --minerthreads 1 --password /tmp/passwordfile --ipcpath ~/.ethereum/geth.ipc console
    
  4. Then running Ethereum Wallet. You should see a PRIVATE-NET indicator on the top of the Ethereum Wallet screen. And you should see your MAIN ACCOUNT (ETHERBASE) clicking out 5 ethers quite quickly.

If this works, set --datadir to your desired destination and use /tmp/passwordfile if you want to.

See also How to change to private network in etherum wallet?

7
  • Followed the steps mentioned above but getting the same error
    – jassu
    Jun 7, 2016 at 10:19
  • Did you check to see if there was more than one instance of geth running? Jun 7, 2016 at 10:22
  • Closed all terminals and started a new one it returned -- 16620 16604 0 16:00 pts/0 00:00:00 grep --color=auto geth
    – jassu
    Jun 7, 2016 at 10:31
  • Please check again just before you get the error message, then when you get the error message, then after you get the error message. Jun 7, 2016 at 10:33
  • I ran the grep command after error and got this root 4387 2623 46 16:10 pts/2 00:02:00 geth --dev --datadir /tmp/devdatadir --mine --minerthreads 1 --password /tmp/passwordfile --ipcpath /home/lnfotech/.ethereum/geth.ipc console lnfo+ 4545 4531 0 16:14 pts/4 00:00:00 grep --color=auto geth
    – jassu
    Jun 7, 2016 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.