Not able to use geth attach

–1 vote

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
Jan 17 in Blockchain by digger
• 26,550 points
224 views

1 answer to this question.

0 votes

You are getting this error because you have not specified a port and address for geth process to connect. Due to this, when you are using geth attach, get is not able to find the address and port mentioned in the command. To solve this error, you have mention the address and port while starting the Blockchain. Like this:

geth --datadir ./myDataDir --networkid 1114 console 2 --rpc --rpcport 8543 --rpcaddr 127.0.0.1
answered Jan 17 by Omkar
• 67,480 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

Not able to create new account in geth for private ethereum network

Looks like the account you are trying ...READ MORE

answered Dec 6, 2018 in Blockchain by Omkar
• 67,480 points
110 views
–1 vote
1 answer

Not able to create new account in geth for private ethereum blockchain

personal.newAccount() is not a default geth method. This ...READ MORE

answered Jan 17 in Blockchain by Omkar
• 67,480 points
208 views
0 votes
1 answer

Not able to use ERC721 token in my project

Like this error indicates, you have to ...READ MORE

answered Jan 23 in Blockchain by Omkar
• 67,480 points
62 views
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 374 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
140 views
0 votes
1 answer
0 votes
1 answer

Not able to attach geth.ipc: Fatal: Unable to attach to remote geth: connect: connection refused

You should not mention double quotes for ...READ MORE

answered Dec 6, 2018 in Blockchain by Omkar
• 67,480 points
369 views
0 votes
1 answer

Not able to invoke a contract in Ethereum Private chain using geth

Hope this helps: contract mortal { /* ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 67,480 points
41 views