HyperLedger Fabric First 网络设置问题

HyperLedger Fabric First Network Setup Issues

我是 HyperLedger 光纤技术的新手,我正在关注 this official tutorial 来构建我的第一个网络。我将 example.com 替换为我公司的域名。生成证书后,我 运行 使用以下命令来建立我的网络:

./byfn.sh up -c ttchannel

我在创建频道时遇到以下错误:

Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!

然后我从 PEERs 容器验证对等点已经连接到这个通道(不知道为什么以及什么时候建立这个连接),所以,我重新启动了这个网络然后得到以下错误:

Error: failed to create deliver client: failed to load config for OrdererClient: unable to load orderer.tls.rootcert.file: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/vodworks.com/orderers/orderer.vodworks.com/msp/tlscacerts/tlsca.vodworks.com-cert.pem: no such file or directory
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!

然后我在 CLI 容器 中验证 crypto 目录不可访问,所以我必须重新启动该容器才能实现无障碍。但我仍然无法 运行 它。

谁能告诉我这些错误是什么意思,我该如何 运行 我的网络?

您具体在哪里更改 "example.com"?我很确定安装脚本还会创建所有基于 configtx.yaml 文件的加密 material,该文件在任何地方都有 "example.com" 作为域。 docker-compose 文件然后将创建的文件夹作为卷映射到容器中(参见 docker-compose-base.yml):

../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp

因此 docker-compose 文件也希望证书位于此文件夹中。根据您的描述,我预计您在某个时候错过了更改域。

此错误的原因是网络未正常关闭。正如我通过 运行 在每个对等点的容器内执行命令 peer channel list 验证的那样,所有对等点都已连接到通道,这导致以下输出:

Channels peers has joined:
ttchannel

在这种情况下,命令 peer channel create ... 实际上抛出了这个错误。因此,我可以使用以下命令成功 运行 网络:

**./byfn.sh restart -c ttchannel -s couchdb -t 60 -d 10**

其实是先把网络关了再启动。