Geth and Mist Error – Error Starting Protocol Stack: Datadir Already Used by Another Process

go-ethereummist

I am runing the mist wallet app.

In Terminal (macos), I also want to start a miner process geth --etherbase 1 --mine --port 0

But geth --mine failed with this error message:

Fatal: Error starting protocol stack: datadir already used by another
process

Is there anyway I can have both programs to run concurrently?

Best Answer

This is possible:

1) Start geth in Terminal first:

> geth --mine

2) Launch Mist, but also from Terminal so you can pass commands to make it connect to the IPC created by geth. On my computer, it looks something like this:

> /Applications/Mist.app/Contents/MacOS/Mist --rpc ~/Library/Ethereum/geth.ipc

Note: you need to change the paths above to correspond with where those files are on your computer and where you're calling them from, as well as the network.

The geth.ipc file is only created/shows up after you have started geth.


For example, another example of this with testnet is:

Terminal 1

> geth --testnet --mine

Terminal 2 (from home folder)

> cd /Applications
> Mist.app/Contents/MacOS/Mist --rpc ~/Library/Ethereum/testnet/geth.ipc
Related Topic