Hyperledger Fabric Peer 2 Peer-通道启动错误

时间:2017-06-19 17:34:16

标签: hyperledger-fabric

我在GitHub上使用Hyperledger Fabric代码库。当我从生成证书手动完成所有步骤到通过cli容器启动网络时,我执行时会出现以下错误

peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem

我甚至做过 export FABRIC_CFG_PATH=$PWD 但我仍然得到以下错误:

2017-06-15 19:35:37.332 UTC [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/p‌​eerOrganizations/org‌​1.example.com/users/‌​Admin@org1.example.c‌​om/msp/intermediatec‌​erts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/pe‌​erOrganizations/org1‌​.example.com/users/A‌​dmin@org1.example.co‌​m/msp/intermediatece‌​rts: no such file or directory]

2017-06-15 19:35:37.332 UTC [msp] getMspConfig -> INFO 002 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/p‌​eerOrganizations/org‌​1.example.com/users/‌​Admin@org1.example.c‌​om/msp/intermediatec‌​erts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/pe‌​erOrganizations/org1‌​.example.com/users/A‌​dmin@org1.example.co‌​m/msp/crls: no such file or directory]

2017-06-15 19:35:37.333 UTC [msp] getMspConfig -> INFO 003 MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/p‌​eerOrganizations/org‌​1.example.com/users/‌​Admin@org1.example.c‌​om/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/pe‌​erOrganizations/org1‌​.example.com/users/A‌​dmin@org1.example.co‌​m/msp/config.yaml: no such file or directory]

当我尝试通过./network.sh中提供的自动脚本运行它时,我收到以下错误:

2017-06-15 20:18:45.664 UTC [grpc] Printf -> DEBU 006 Failed to dial orderer.example.com:7050: connection error: desc = "transport: authentication handshake failed: x509: certificate has expired or is not yet valid"; please retry.Error: Error connecting due to rpc error: code = Internal desc = connection error: desc = "transport: authentication handshake failed: x509: certificate has expired or is not yet valid"

3 个答案:

答案 0 :(得分:2)

嗯,首先请注意,您收到的消息是

  

2017-06-15 19:35:37.332 UTC [msp] getMspConfig - > INFO 002 crls文件夹找不到[/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/p eerOrganizations / org 1.example.com/users/ Admin@org1.example.c OM / MSP / intermediatec专家评审组]。跳过:[stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/pe erOrganizations / org1 .example.com / users / A dmin@org1.example.co m / msp / crls:没有这样的文件或目录]

它们不是错误消息,这很好。

接下来,请注意

  

导出FABRIC_CFG_PATH = $ PWD

configtxgen工具的上下文相关,在执行peer cli命令时没有意义。

不确定你正在尝试用network.sh脚本做什么,因为它的主要目标只是运行端到端测试,两个组织各有两个对等,安装并实例化chaicode,发出事务并查询断言预期结果的结果。

答案 1 :(得分:0)

我不知道为什么会出现这个错误。 network.sh脚本的执行应该创建一个没有任何问题的网络。你会尝试手动“运行工具”吗?

答案 2 :(得分:0)

删除并重新启动docker容器后,为我修复了它,可能是像我的旧安装一样存在过时的证书。