+1 vote
1 view
in Blockchain by (47.8k points)

I started Ethereum Blockchain using this command:

geth --datadir ./myDataDir --networkid 1114geth --datadir ./myDataDir --networkid 1114

and then from a different terminal, I am trying to connect to this using the following command:

geth attach

But I am not able to attach geth. I am getting the following error:

Fatal: Failed to start the JavaScript console: api modules: Post dial tcp connect: connection refused

1 Answer

0 votes
by (107k points)

The error you are getting because you have not specified a port and address for geth process to connect. So what it is doing is, when you are using geth attach, get is not able to find the address and port mentioned in the command. You can solve this error, as you have mentioned the address and port while starting the Blockchain.

Follow the below-mentioned step:

geth --datadir ./myDataDir --networkid 1114 console 2 --rpc --rpcport 8543 --rpcaddr

Welcome to Intellipaat Community. Get your technical queries answered by top developers !