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.
I have following active docker running
Before 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.
I have met the same error during run sample, it failed to connect. I fixed it with following steps:
ifconfig
localhosts
in query.js
with IP in #1Example:
@@ -12,7 +12,7 @@ var options = {
user_id: 'PeerAdmin',
channel_id: 'mychannel',
chaincode_id: 'fabcar',
- network_url: 'grpc://localhost:7051',
+ network_url: 'grpc://****:7051',
};
Addition to Angela's answer:
To anyone having this issue and using Docker Toolbox, do docker-machine ls
and copy the IP adress at the URL column of your ACTIVE machine and paste the IP adress to every localhost
in both query.js
and invoke.js
files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With