i have been running multiple geth instances on a single machine for the conceptualization of private blockchain. Now i am trying to run two different and separate from each other geth instances on same machine but i am running into this error.

INFO [03-18|04:08:42.491] Blockchain manager stopped
INFO [03-18|04:08:42.547] Stopping Ethereum protocol
INFO [03-18|04:08:42.562] Ethereum protocol stopped
INFO [03-18|04:08:42.572] Transaction pool stopped
INFO [03-18|04:08:42.601] Database closed                          database=C:\\Production\\data\\geth\\chaindata
Fatal: Error starting protocol stack: Access is denied. 

Is it possible to achieve what i am trying to do? Two different geth instances and each one initialized with different genesis.json but on same machine. Commands i am using to run geth instances for this scenario.

Geth 1 Directory c:/Project

geth --datadir data --port 30311 --ws --wsport 8502 -wsapi 'personal,db,eth,net,web3,txpool,miner' --wsorigins="*" --networkid 786 --gasprice '1' -unlock '0x042b1b16eccb6c6bafdceaafea5e9e117990feef' --password data/password.txt --mine console

Geth 2 Directory c:/production

 geth --datadir data --port 30312 --ws --wsport 8503 -wsapi 'personal,db,eth,net,web3,txpool,miner' --wsorigins="*" --networkid 123 --gasprice '1' -unlock '0x6626ee38f917d1e922b86f3eb7e27ea1749b3242' --password data/password.txt --mine console
  • Try giving them different --ipcpath values, e.g. pass --ipcpath geth-dev.ipc to the first instance and --ipcpath geth-prod.ipc to the second one. – Mikhail Vladimirov Mar 18 '19 at 12:45
  • It works. Thanks a lot. Please add it as answer so i could accept it as answer for others that might be having same problem. – Saeedi Mar 19 '19 at 5:20

Apart from TCP ports, geth opens so-called local sockets on UNIX and named pipes on Windows. While local sockets reside in data dirdctory, and setting different data directories is enough to avoid naming conflicts, named pipes share the same global namespace, so you need to explicitly set different pipe names for your geth instances via --ipcpath command line option, e.g. pass --ipcpath geth-dev.ipc to the first instance and --ipcpath geth-prod.ipc to the second one.

Your Answer

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

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