Self Signed Certificate Error while starting Hyperledger Composer application












0















I wrote a sample application on hyperledger composer to be deployed. While the generation of .bna file and installation of the .bna file on the network were successful, starting the network is throwing up a certificate error. I've copied the .pem file which is the certificate required (according to our organization proxy) to /etc/ssl/certs. Also I've mentioned the path to it in the .npmrc file.



I've followed an online tutorial and installed hyperledger composer and fabric.
Steps followed while deploying this application are:



Executed teardownFabric.sh.
Executed stopFabric.sh.
Executed startFabric.sh.
Executed createPeerAdminCard.sh.
yo hyperledger-composer
Chosen business network and gave the required inputs.
npm install After moving into the directory specified for the application
Edited the lib/logic.js file.
Edited the models/test.cto file
Edited the permissions.acl file
Created the .bna file using the command: composer archive create -t dir -n .
Ran npm install



Installed the business network archive on fabric network using the command:



composer network install --card PeerAdmin@hlfv1 --archiveFile banking@0.0.1.bna -o npmrcFile=~/Documents/fabric-dev-servers/npmConfig


Note: The npmConfig had the same contents as the .npmrc file.



Till here all the commands worked as expected.



THE REAL PROBLEM
14. Deploying the business network:



composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card


Contents of .npmrc file



strict-ssl=true
registry=https://registry.npmjs.org/
cafile=/home/vasista/Sophos Certificate/SecurityAppliance_SSL_CA.pem


EXPECTED RESULT
Command should have succeeded by generating the business network card by the name networkadmin.card



OBSERVED RESULT



vasista@vasista-OptiPlex-9020:~/Documents/fabric-dev-servers/banking$ composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
Starting business network banking 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: failed to execute transaction 422e36073a6b4797667e6a3ef2773bf63076ae44f67faf79ff070b529494fd5f: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/composer-common failed,
reason: self signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2019-01-21T15_11_41_226Z-debug.log

"

Command failed


I've tried again after setting strict-ssl=false in .npmrc. But still it doesn't work.
Also posted on github










share|improve this question



























    0















    I wrote a sample application on hyperledger composer to be deployed. While the generation of .bna file and installation of the .bna file on the network were successful, starting the network is throwing up a certificate error. I've copied the .pem file which is the certificate required (according to our organization proxy) to /etc/ssl/certs. Also I've mentioned the path to it in the .npmrc file.



    I've followed an online tutorial and installed hyperledger composer and fabric.
    Steps followed while deploying this application are:



    Executed teardownFabric.sh.
    Executed stopFabric.sh.
    Executed startFabric.sh.
    Executed createPeerAdminCard.sh.
    yo hyperledger-composer
    Chosen business network and gave the required inputs.
    npm install After moving into the directory specified for the application
    Edited the lib/logic.js file.
    Edited the models/test.cto file
    Edited the permissions.acl file
    Created the .bna file using the command: composer archive create -t dir -n .
    Ran npm install



    Installed the business network archive on fabric network using the command:



    composer network install --card PeerAdmin@hlfv1 --archiveFile banking@0.0.1.bna -o npmrcFile=~/Documents/fabric-dev-servers/npmConfig


    Note: The npmConfig had the same contents as the .npmrc file.



    Till here all the commands worked as expected.



    THE REAL PROBLEM
    14. Deploying the business network:



    composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card


    Contents of .npmrc file



    strict-ssl=true
    registry=https://registry.npmjs.org/
    cafile=/home/vasista/Sophos Certificate/SecurityAppliance_SSL_CA.pem


    EXPECTED RESULT
    Command should have succeeded by generating the business network card by the name networkadmin.card



    OBSERVED RESULT



    vasista@vasista-OptiPlex-9020:~/Documents/fabric-dev-servers/banking$ composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
    Starting business network banking 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: failed to execute transaction 422e36073a6b4797667e6a3ef2773bf63076ae44f67faf79ff070b529494fd5f: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
    npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
    npm ERR! request to https://registry.npmjs.org/composer-common failed,
    reason: self signed certificate in certificate chain

    npm ERR! A complete log of this run can be found in:

    npm ERR! /root/.npm/_logs/2019-01-21T15_11_41_226Z-debug.log

    "

    Command failed


    I've tried again after setting strict-ssl=false in .npmrc. But still it doesn't work.
    Also posted on github










    share|improve this question

























      0












      0








      0








      I wrote a sample application on hyperledger composer to be deployed. While the generation of .bna file and installation of the .bna file on the network were successful, starting the network is throwing up a certificate error. I've copied the .pem file which is the certificate required (according to our organization proxy) to /etc/ssl/certs. Also I've mentioned the path to it in the .npmrc file.



      I've followed an online tutorial and installed hyperledger composer and fabric.
      Steps followed while deploying this application are:



      Executed teardownFabric.sh.
      Executed stopFabric.sh.
      Executed startFabric.sh.
      Executed createPeerAdminCard.sh.
      yo hyperledger-composer
      Chosen business network and gave the required inputs.
      npm install After moving into the directory specified for the application
      Edited the lib/logic.js file.
      Edited the models/test.cto file
      Edited the permissions.acl file
      Created the .bna file using the command: composer archive create -t dir -n .
      Ran npm install



      Installed the business network archive on fabric network using the command:



      composer network install --card PeerAdmin@hlfv1 --archiveFile banking@0.0.1.bna -o npmrcFile=~/Documents/fabric-dev-servers/npmConfig


      Note: The npmConfig had the same contents as the .npmrc file.



      Till here all the commands worked as expected.



      THE REAL PROBLEM
      14. Deploying the business network:



      composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card


      Contents of .npmrc file



      strict-ssl=true
      registry=https://registry.npmjs.org/
      cafile=/home/vasista/Sophos Certificate/SecurityAppliance_SSL_CA.pem


      EXPECTED RESULT
      Command should have succeeded by generating the business network card by the name networkadmin.card



      OBSERVED RESULT



      vasista@vasista-OptiPlex-9020:~/Documents/fabric-dev-servers/banking$ composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
      Starting business network banking 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: failed to execute transaction 422e36073a6b4797667e6a3ef2773bf63076ae44f67faf79ff070b529494fd5f: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
      npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
      npm ERR! request to https://registry.npmjs.org/composer-common failed,
      reason: self signed certificate in certificate chain

      npm ERR! A complete log of this run can be found in:

      npm ERR! /root/.npm/_logs/2019-01-21T15_11_41_226Z-debug.log

      "

      Command failed


      I've tried again after setting strict-ssl=false in .npmrc. But still it doesn't work.
      Also posted on github










      share|improve this question














      I wrote a sample application on hyperledger composer to be deployed. While the generation of .bna file and installation of the .bna file on the network were successful, starting the network is throwing up a certificate error. I've copied the .pem file which is the certificate required (according to our organization proxy) to /etc/ssl/certs. Also I've mentioned the path to it in the .npmrc file.



      I've followed an online tutorial and installed hyperledger composer and fabric.
      Steps followed while deploying this application are:



      Executed teardownFabric.sh.
      Executed stopFabric.sh.
      Executed startFabric.sh.
      Executed createPeerAdminCard.sh.
      yo hyperledger-composer
      Chosen business network and gave the required inputs.
      npm install After moving into the directory specified for the application
      Edited the lib/logic.js file.
      Edited the models/test.cto file
      Edited the permissions.acl file
      Created the .bna file using the command: composer archive create -t dir -n .
      Ran npm install



      Installed the business network archive on fabric network using the command:



      composer network install --card PeerAdmin@hlfv1 --archiveFile banking@0.0.1.bna -o npmrcFile=~/Documents/fabric-dev-servers/npmConfig


      Note: The npmConfig had the same contents as the .npmrc file.



      Till here all the commands worked as expected.



      THE REAL PROBLEM
      14. Deploying the business network:



      composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card


      Contents of .npmrc file



      strict-ssl=true
      registry=https://registry.npmjs.org/
      cafile=/home/vasista/Sophos Certificate/SecurityAppliance_SSL_CA.pem


      EXPECTED RESULT
      Command should have succeeded by generating the business network card by the name networkadmin.card



      OBSERVED RESULT



      vasista@vasista-OptiPlex-9020:~/Documents/fabric-dev-servers/banking$ composer network start --networkName banking --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
      Starting business network banking 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: failed to execute transaction 422e36073a6b4797667e6a3ef2773bf63076ae44f67faf79ff070b529494fd5f: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
      npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
      npm ERR! request to https://registry.npmjs.org/composer-common failed,
      reason: self signed certificate in certificate chain

      npm ERR! A complete log of this run can be found in:

      npm ERR! /root/.npm/_logs/2019-01-21T15_11_41_226Z-debug.log

      "

      Command failed


      I've tried again after setting strict-ssl=false in .npmrc. But still it doesn't work.
      Also posted on github







      certificate composer






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 22 at 10:11









      VasistaVasista

      11




      11






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1396949%2fself-signed-certificate-error-while-starting-hyperledger-composer-application%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1396949%2fself-signed-certificate-error-while-starting-hyperledger-composer-application%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Plaza Victoria

          In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

          How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...