使用作曲家工具提供的示例,我从以下链接获得了什么 .

https://github.com/hyperledger/composer-tools/tree/master/packages/fabric-dev-servers

我能够运行downloadFabric.sh文件并获取启动结构网络所需的docker镜像,之后,我运行startFabric.sh文件,过了一会儿,一切正常 .

现在,我正在尝试创建自定义结构网络,我所做的是编辑yaml文件以使用我的配置生成证书,工件和docker容器图像 .

我成功地更改了文件并启动了网络 .

然后我继续创建一个通道,然后将所有对等体或至少锚点对等体加入到通道中,但是这样做我得到了一个错误 .

第一个对等体能够加入该通道,但第二个对等体失败 . 这是我得到的错误 .

2018-03-13 23:13:31.737 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/fabric/users/Admin@manufacture.example.com/msp folder

我不知道这个错误意味着什么,但寻找答案我发现以下文章提供了一个可能的解决方案 .

Cannot run peer because cannot init crypto

我试过但没有运气 .

此时,我不知道这个错误的真正原因是什么 .

如果要复制此问题,只需下载以下存储库并运行2个文件 .

https://github.com/osvaldovega/blockchain-fabric

  • downloadFabric.sh

  • startFabric.sh

startFabric.sh是一个文件,我自定义为我做这一切,然后我不必手动执行命令 .

如果需要,可以检查startFabric.sh脚本并查看函数执行的内容 .

我执行加入第一个对等体的第一个命令就是这个 .

docker exec -e CORE_PEER_ADDRESS = peer0.portal.example.com:7051 -e CORE_PEER_LOCALMSPID ='PortalMSP'-e CORE_PEER_TLS_ROOTCERT_FILE = / etc / hyperledger / fabric / tls / ca.crt -e CORE_PEER_MSPCONFIGPATH = / etc / hyperledger / fabric / users/Admin@portal.example.com/msp peer0.portal.example.com peer channel join -b composerchannel.block

这个命令工作正常,但当我尝试加入第二个对等的第二个成员是我收到错误 .

该命令非常相似 .

docker exec -e CORE_PEER_ADDRESS = peer0.manufacture.example.com:7051 -e CORE_PEER_LOCALMSPID ='ManufactureMSP'-e CORE_PEER_TLS_ROOTCERT_FILE = / etc / hyperledger / fabric / tls / ca.crt -e CORE_PEER_MSPCONFIGPATH = / etc / hyperledger / fabric / users/Admin@manufacture.example.com/msp peer0.portal.example.com peer channel join -b composerchannel.block

我知道在这种情况下对等应该是 peer0.manufacture.example.com 但是如果我将它更改为此对等体,则错误消息是 .

2018-03-14 16:29:50.122 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-14 16:29:50.122 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-14 16:29:50.124 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized Error: genesis block file not found open composerchannel.block: no such file or directory

但是如果我使用peer peer0.portal.example.com 这是我用来创建 Channels 的对等体,我会得到这个原始错误 .

2018-03-14 16:32:08.995 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/fabric/users/Admin@manufacture.example.com/msp folder

谢谢 .