我正在尝试使用超级分类帐编写器设置网络,为此我按照Developer tutorial for creating a Hyperledger Composer solution但是当我使用命令时
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
我试图撕下布料并再次启动布料,但它没有帮助 .
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-information如果您发现在启动或升级请求中获得了REQUEST_TIMEOUT,则可以尝试增加启动超时的结构默认值的超时 .
如果您使用来自
composer-tools
github repo的简单Hyperledger Composer development server environment,那么您可以将以下内容添加到对等定义中,以查看它是否解决了问题:在文件
~/fabric-tools/fabric-scripts/hlfv11/composer/docker-compose.yml
中,例如,上面是对等定义的片段 . 您必须从该目录位置执行docker-compose stop
- 然后docker-compose start
才能生效 .脚注:
除了上面的CORE_CHAINCODE_STARTUPTIMEOUT更改之外 - 您还必须在执行composer network start命令的卡的
connection.json
文件中更新匹配的超时值(即CORE_CHAINCODE_STARTUPTIMEOUT)(例如$ HOME / .composer中的PeerAdmin卡) . 在'client'部分,在"connection"节下,您将看到4个超时(3个用于对等,1个用于订单) . 默认情况下,这些设置为300秒 - 将值增加到1200
. 请注意,CORE_CHAINCODE_STARTUPTIMEOUT必须具有'trailing s',而上面定义的这4个超时 - 没有这个 .