zoukankan      html  css  js  c++  java
  • REQUEST_TIMEOUT 解决方案

     you need to pass an npmrc file when you install the business network onto the peers. For more info see the page
    https://hyperledger.github.io/composer/latest/managing/connector-information
    which will provide examples on how to do this.


    Hyperledger Fabric

    There are several cases where information specific to Hyperledger Fabric must be included in Hyperledger Composer commands, including composer network installcomposer network start and composer identity issue. The --option, -o option and the --optionsFile, -O option allow connector specific information to be sent.

    Multiple options can be specified using the --option, -o by repeating the tag, for example:

    Copy
    composer somecmd -o thisOpt=value2 -o thatOpt=value2
    

    Alternatively you can create a single file to contain multiple options, for example a file called someCmdOpts.txtcould contain:

    Copy
    thisOpt=value1
    thatOpt=value2
    

    To reference an options file, use the following format:

    Copy
    composer somecmd --optionsFile=someCmdOpts.txt
    

    Some API's will also include the option to pass a generic options object including AdminConnection.start()and AdminConnection.install()

    Providing npm config settings for install

    CLI

    The npmrcFile option is available on the composer network install command.

    The npmrcFile option allows you to specify npm configuration information when Hyperledger Fabric builds the chaincode image for the Hyperledger Composer runtime.

    For example rather than using the default npm registry, you can specify an internal registry within your organization by including the registry option in an options file:

    Copy
    registry=http://mycompanynpmregistry.com:4873
    

    Supply the fully qualified filename as part of an install command, for example if the file was called npmConfig in your /home/user1/config directory:


    error:

    Error: Error trying to start business network. Error: 

    No valid responses from any peers. Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT

    solution1:

    composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card -o registry=http://registry.npm.taobao.org
    

    solution2:

    in DevServer_connection.json:
    change the 3 peers' and orderer's timeout to 1200
    
    in fabric-dev-servers/fabric-scripts/hlfv11/composer/docker-compose-dev.yml
    add:
    CORE_CHAINCODE_STARTUPTIMEOUT=1200s  

    最终解决方案:

    composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card -o npmrcFile=/home/xuzheng/.npmrc

    # 指定了.npmrc 文件的路径,该文件用于配置镜像源

      

  • 相关阅读:
    .NET安全系列之六:强名程序集
    Flash Player10.1.102.64版本后,跨域访问不支持带中文的地址
    ArcSDE 服务启动后又停止的解决方式一例
    ArcGIS Engine Maplex Label(标注)使用一例
    设置frameset的framespacing的颜色
    html表格导出Excel的一点经验心得
    解决Unable to create logfile system tables. User perhaps lacks permissions or resources to create tables
    WCF方法重载
    respond_to 和 respond_with
    Linux Apache服务器相关的重要目录
  • 原文地址:https://www.cnblogs.com/sddai/p/9430162.html
Copyright © 2011-2022 走看看