1

I'm following the Developer Tutorial (https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial). When I try to start the Business using - composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card, this is the error I see:

Starting business network tutorial-network at version 0.0.1

Processing these Network Admins: 
    userName: admin

✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/composer-common failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-05-21T20_15_54_162Z-debug.log
"
Command failed

Error message

I'm on composer v0.19.5. This was helpful, but didn't solve my issue. I have successfully installed the network, starting it is the issue!

ameyaraje
  • 157
  • 4
  • 16

1 Answers1

1

see the answer below -

Error in starting hyperledger fabric network with hyperledger composer

During the chaincode build, Fabric does an npm install. Looks like you're behind a proxy (npm install not being able to access https://registry.npmjs.org/ suggests you're behind a proxy and therefore it can't resolve the URL above (to pull down a Composer npm module/dependency during install)). So you would need to provide an npmrc file - in the composer network install command sequence - so that it can configure the behaviour of the npm install - and access a known registry, like https://registry.npmjs.org/ . See more information on this here -> https://hyperledger.github.io/composer/latest/managing/connector-information

example might be:

proxy="http://172.10.117.21:3128/"
https-proxy="http://172.10.117.31:3128/"
registry = "http://registry.npmjs.org/"
Paul O'Mahony
  • 6,740
  • 1
  • 10
  • 15
  • I read your other answer too. So just to understand - Do I create an npmrc file for this project and add the registry as mentioned in https://hyperledger.github.io/composer/latest/managing/connector-information and then run composer start with the this parameter? – ameyaraje May 21 '18 at 22:15
  • 1
    the npmrc file is passed as an option when you install the network, not when you start the network. – david_k May 22 '18 at 09:46
  • 1
    yes, with the parameter and provide the npmrcfile file with the contents as suggested. For clarity (and benefit of others) have edited my msg, as david_k says - this is provided to the `composer network install` command not the `composer network start` command. – Paul O'Mahony May 22 '18 at 12:29
  • I added the .npmrc file in the install command, but I now see the error -- npm ERR! request to https://registry.npmjs.org/composer-runtime-hlfv1 failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443 -- I tried adding the registry as https://registry.npmjs.org/ as well as http://mycompanynpmregistry.com:4873. What else can I try? – ameyaraje May 22 '18 at 14:04
  • try `http://` as shown above in answer. `mycompnpmregistry` is where, you've set up your own corporate registry, if that were used as a 'Verdaccio' style 'local' registry server (ie as an example). – Paul O'Mahony May 22 '18 at 14:42