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
• 27,620 points
1,010 views

3 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
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

        }
    }
};
answered Feb 19 by Dinesh

selected Apr 26 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
• 66,880 points
+1 vote

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

$ geth --rpc
answered Apr 26 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 in Blockchain by Aashish Pasricha
31 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
• 27,620 points
38 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 29, 2018 in Blockchain by Omkar
• 66,880 points
83 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
77 views
0 votes
1 answer
0 votes
1 answer

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

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
45 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
• 66,880 points
502 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
• 66,880 points
71 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.