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, 2019 in Blockchain by digger
• 26,740 points
5,432 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, 2019 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer
+1 vote
2 answers

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
• 69,220 points
4,117 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, 2019 in Blockchain by Omkar
• 69,220 points
3,799 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, 2019 in Blockchain by Omkar
• 69,220 points
805 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, 2019 in Blockchain by saeedi
• 120 points

edited Mar 6, 2019 by Omkar 2,480 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
1,928 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,456 views
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
• 69,220 points
2,984 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
• 69,220 points
983 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP