使用超级账本作曲家启动超级账本结构网络时出错 [英] Error in starting hyperledger fabric network with hyperledger composer

查看:21
本文介绍了使用超级账本作曲家启动超级账本结构网络时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用超级账本作曲家建立网络,为此我遵循了用于创建 Hyperledger Composer 解决方案的开发人员教程但是当我使用命令

I am trying to set up a network using hyper ledger composer, for which I followed the Developer tutorial for creating a Hyperledger Composer solution but when I use the command

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

它给出了以下错误:

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-runtime-hlfv1 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-04-10T10_10_13_361Z-debug.log " Command failed

我曾尝试拆下织物并重新开始织物,但没有帮助.

I have tried tearing down the fabric and starting the fabric again but it didn't help.

推荐答案

  1. 你在代理/防火墙后面吗?如果是这样,在 composer network install 命令中,您需要一个 -o npmrcFile 参数来解析 NPM 注册表.例如 registry=https://mycompanynpmregistry.com:4873(或解析的 IP 地址),如 composer network install -c PeerAdmin@hlfv1 -a digitalproperty-network.bna -o npmrcFile=/tmp/npmrcFile .请参阅 https://hyperledger.github.io/composer/latest/managing/connector-信息

  1. Are you behind a proxy / firewall ? If so in the composer network install command you require a -o npmrcFile parameter, to resolve the NPM registry. eg registry=https://mycompanynpmregistry.com:4873 (or the resolved IP address) as in composer network install -c PeerAdmin@hlfv1 -a digitalproperty-network.bna -o npmrcFile=/tmp/npmrcFile . See https://hyperledger.github.io/composer/latest/managing/connector-information

如果您发现在启动或升级请求时收到 REQUEST_TIMEOUT,您可以尝试增加结构默认启动超时的超时时间.

If you are finding that you get a REQUEST_TIMEOUT on a start or upgrade request, you could try increasing the timeout of the fabric default for startup timeout.

如果您使用的是我们简单的 Hyperledger Composer 开发服务器环境 来自 composer-tools github repo,然后您可以将以下内容添加到对等定义中以查看是否解决了问题:

If you are using our simple Hyperledger Composer development server environment from composer-tools github repo, then you can add the following to the peer definition to see if it addresses the problem:

  • CORE_CHAINCODE_STARTUPTIMEOUT=1200s

在文件~/fabric-tools/fabric-scripts/hlfv11/composer/docker-compose.yml例如,以上是来自对等定义的片段.您必须执行 docker-compose stop - 然后从该目录位置执行 docker-compose start 才能生效.

in the file ~/fabric-tools/fabric-scripts/hlfv11/composer/docker-compose.yml eg, the above is a snippet from the peer definition. You would have to do a docker-compose stop - then docker-compose start from that directory location to take effect.

脚注:

除了上面的 CORE_CHAINCODE_STARTUPTIMEOUT 更改之外 - 您还必须更新执行 composer network start 命令的卡的 connection.json 文件中的超时值以匹配(即 CORE_CHAINCODE_STARTUPTIMEOUT)(例如,$HOME/.composer 中的 PeerAdmin 卡).您将在客户端"部分的连接"节下看到 4 次超时(3 次用于对等点,1 次用于订单).默认情况下,这些设置为 300 秒 - 将每个值增加到 1200.请注意, CORE_CHAINCODE_STARTUPTIMEOUT 必须有 'trailing s' ,而上面定义的这 4 个超时 - 没有这个.

In addition to CORE_CHAINCODE_STARTUPTIMEOUT change above - you MUST ALSO UPDATE the timeout values to match (ie CORE_CHAINCODE_STARTUPTIMEOUT), in the connection.json file for the card(s) that performs the composer network start command (eg. PeerAdmin card in $HOME/.composer). You will see 4 timeouts (3 for a Peer and 1 for the Order) in the 'client' section, under the stanza "connection". By default, these are set to 300 seconds - Increase the value to 1200 for each. Do note that CORE_CHAINCODE_STARTUPTIMEOUT must have the 'trailing s' , whereas these 4 timeouts defined above - don't have this.

这篇关于使用超级账本作曲家启动超级账本结构网络时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆