Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

I am trying to install hyperledger and run chain code. I followed all the steps as directed here. But getting error

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed

while running the query.js. 

enter image description hereI have following active docker running

enter image description hereBefore running the node query.js, when i am running npm install its giving following warning :  npm WARN [email protected] No repository field. Is this the problem. Can any one please help me out about where it is going wrong.

1 Answer

0 votes
by (14.4k points)

Your problem can be fixed by following some steps. 

Firstly, you can fetch your machine’s IP address with the command ifconfig

Secondly, you can replace localhosts in query.js with the fetched IP. 

The chain code should execute. However, if you are using Docker Toolbox, you can use the command docker -machine ls to fetch the IP address. Then you can copy that IP address to your URL column and paste the same to all localhosts in query.js & invoke.js files. 

Browse Categories