Fabric fabric Faber for Hyperledger showing connection failed ERROR

I am trying to set a hyperlink and run chain code. I followed all the steps as indicated here . But getting the error

error: [client-utils.js]: sendPeersProposal - promise rejected: error: connection with error

when running query.js. enter image description here I have the next active docker enter image description here Before running node query.js , when I run npm install , it gives the following warning: npm WARN fabcar@1.0.0 No repository field. This is problem. Can someone please help me on where this is happening.

+5
source share
4 answers

Addition to Angela's answer:

For anyone who has this problem and uses the Docker Toolbox, do docker-machine ls and copy the IP address in the ACTIVE column of your computer’s URL column and paste the IP address into each localhost in the query.js and invoke.js .

+2
source

I met the same error during the sample run that it was not possible to connect. I fixed it with the following steps:

  • get device IP address using: ifconfig
  • replace localhosts with query.js with IP in # 1

Example:

 @@ -12,7 +12,7 @@ var options = { user_id: 'PeerAdmin', channel_id: 'mychannel', chaincode_id: 'fabcar', - network_url: 'grpc://localhost:7051', + network_url: 'grpc://****:7051', }; 
+1
source

I saw that this error occurs when datasources.json indicates that network addresses start with grpcs:// , but the network is not configured to use TLS. Try changing them to start with grpc:// .

0
source

Do docker-machine ls

Output :

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

  • copy the specified IP address, for example: 192.168.99.100
  • go to \ fabric-samples \ fabcar \ query.js
  • replace localhost with IP address
0
source

Source: https://habr.com/ru/post/1269506/


All Articles