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,720 points

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

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


and then run 

truffle migrate
answered Nov 29, 2018 by Omkar
• 69,170 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
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,720 points
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,170 points
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,830 points
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 aryya
• 7,440 points
+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 domain name ...READ MORE

answered Nov 13, 2018 in Blockchain by Omkar
• 69,170 points
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,170 points