+1 vote
1 view
in Blockchain by (47.7k 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 http://127.0.0.1:8543

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

Fatal: Failed to start the JavaScript console: api modules: Post http://127.0.0.1:8543: dial tcp 127.0.0.1:8543: 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 127.0.0.1

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


Categories

...