Truffle migrate Could not connect to your Ethereum client

0 votes

I am trying to implement truffle metacoin tutorial. When i run truffle migrate, I get the following error. How to solve this?

Could not connect to your Ethereum client. Please check that your Ethereum client:
    - is running
    - is accepting RPC connections (i.e., "--rpc" option is used in geth)
    - is accessible over the network
    - is properly configured in your Truffle configuration file (truffle.js)
Nov 29, 2018 in Blockchain by digger
• 26,740 points
11,780 views

3 answers to this question.

+2 votes
Best answer

As mentioned in the previous answer, you have to run testrpc first. If testrpc is running and still you get this error then make sure that you have added the port number of testrpc right. By default, testrpc will run on port 8545, so your  truffle.js file should look something like this:

module.exports = {
    networks: {
        development: {
//Other entries
            port: 8545,            
// Remaining entries

        }
    }
};


Hope these information helps.

To know more, enroll with our Blockchain online training without fail.

Thanks.

answered Feb 19, 2019 by Dinesh

selected Apr 26, 2019 by Omkar

Had the same problem. I had not configured the truffle.js file. It worked after I configured it. Thanks!

0 votes

It seems like your network is not running. Open another terminal and run

testrpc

and then run 

truffle migrate
answered Nov 29, 2018 by Omkar
• 69,220 points
+1 vote

You have to start the rpc first. You can use the following command for it:

$ geth --rpc
answered Apr 26, 2019 by Firoz

Related Questions In Blockchain

0 votes
1 answer

Not able to connect to Ethereum client.

There is another way to link it. ...READ MORE

answered Apr 28, 2019 in Blockchain by Aashish Pasricha
1,117 views
0 votes
1 answer

How to connect to already running go ethereum client using mist Ubuntu

Hey, you can solve the issue by using sudo ...READ MORE

answered Sep 18, 2018 in Blockchain by digger
• 26,740 points
694 views
0 votes
1 answer

Not able to migrate contract in Truffle: Error: No network specified. Cannot determine current network

Make these entries in truffle.js file: module.exports = { ...READ MORE

answered Nov 30, 2018 in Blockchain by Omkar
• 69,220 points
1,141 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,900 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,423 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,385 views
+2 votes
3 answers

Hyperledger Fabric: Peer Connection error: Failed obtaining connection: Could not connect to any of the endpoints.

 You can extend your /etc/hosts file and make orderer.example.com domain name ...READ MORE

answered Nov 13, 2018 in Blockchain by Omkar
• 69,220 points
3,842 views
0 votes
1 answer

Not able to start testrpc for Ethereum truffle

Hey. It seems like you already have ...READ MORE

answered Nov 28, 2018 in Blockchain by Omkar
• 69,220 points
915 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