Hyperledger fabcar sample fabric showing connect failed ERROR

Viewed 4124

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 runningenter image description here Before running the node query.js, when i am running npm install its giving following warning : npm WARN fabcar@1.0.0 No repository field. Is this the problem. Can any one please help me out about where it is going wrong.

4 Answers

I have seen that error occur when datasources.json specifies that the network addresses start with grpcs://, but the network is not set up to use TLS. Try changing them to start with grpc://.

Do docker-machine ls

Output:

$ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOC default virtualbox Running tcp://192.168.99.100:2376 v17

  • copy the ip address mentioned , like : 192.168.99.100
  • go to \fabric-samples\fabcar\query.js
  • replace the localhost with the IP address
Related