首页 > 解决方案 > 无法将 bna 部署到现有的 Hyperledger Fabric 安装

问题描述

我正在尝试将我的 BNA(在我的开发机器上开发)部署到现有的 Hyperledger Fabric 安装。Fabric 是由我无法联系的另一个开发人员安装的。我能够启动 Playground 并查看另一个已部署的网络,但我无法部署自己的网络:

$ composer network install -a ./dist/noiz.bna -c PeerAdmin@composer-network-a ✖ Installing business network. This may take a minute... Error: Error trying install business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed Command failed

我尝试使用 Playground 创建新的 PeerAdmin 卡,但使用此卡进行部署无济于事。结果不一样(可能是因为我使用 admin/adminpw 来创建卡片):

✖ Installing business network. This may take a minute... Error: Error trying install business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])) Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed Command failed

我正在使用作曲家 0.19.5。我相信 TLS 已开启。

这是我的docker ps,以防万一:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES aa4d7a9d2ccd dev-peer0.a.example.com-export_import-0.0.1-5d8a845d4c4a29001b15ec77fa81c2b896564f083c5b2d55a9a5e5252cf98754 "/bin/sh -c 'cd /usr…" 2 hours ago Up 2 hours dev-peer0.a.example.com-export_import-0.0.1 5f7a9b240371 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 29 hours ago Up 4 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.a.example.com 32f274f31bd6 hyperledger/fabric-couchdb:x86_64-0.4.6 "tini -- /docker-ent…" 29 hours ago Up 4 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb.peer0.a.example.com 54b8b4e2816d hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 29 hours ago Up 4 hours 0.0.0.0:7054->7054/tcp ca.a.example.com ddb2594ddcfd hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 29 hours ago Up 4 hours 0.0.0.0:7050->7050/tcp orderer.example.com

这是输出channel list

$ docker exec peer0.a.example.com peer channel list 2018-05-22 18:37:26.073 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-05-22 18:37:26.073 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-05-22 18:37:26.076 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized 2018-05-22 18:37:26.076 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A90070A5B08031A0B08E6C691D80510...631A0D0A0B4765744368616E6E656C73 2018-05-22 18:37:26.077 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 138FECCD301FA969418E2DE047CEA7B1E506880E726EC0F14E2542D33C7A0CCE 2018-05-22 18:37:26.080 UTC [main] main -> INFO 006 Exiting..... Channels peers has joined: mychannel

标签: hyperledger-fabrichyperledgergrpchyperledger-composer

解决方案


这有点困难,因为您的同事已经设置了定制面料。

此错误Error: 14 UNAVAILABLE: Connect Failed Command failed通常很快就会出现,这意味着 CLI 找不到在 connection.json 文件中为所用卡指定的 Fabric。因此,您可以查看卡的 connection.json 并查看指定的 Fabric 和 URL。该文件将类似于~/.composer/cards/PeerAdmin@composer-network-a/connection.json 没有空格或换行符的文件将难以阅读,因此将其粘贴到 JSON 查看器中会有所帮助。

您是否尝试composer card list查看是否有其他可用的管理卡?

你说你可以启动 Playground——是在 Docker 容器中还是在 CLI 中?

如果您有权访问您的同事生成加密材料的文件夹,您可能能够创建一个新的管理员卡 - 作曲家单组织多组织教程展示了如何基于现有的加密材料构建卡。


推荐阅读