Hyperledger Fabric byfn.sh脚本无法加载证书

操作系统:Windows 10 Home Edition 2004 64位

Docker版本:19.03.8

docker-compose版本:1.25.5

使用./byfn.sh建立网络时,在创建通道,加入对等方以及在对等方查询链码时加载证书时遇到了多个错误。任何人都遇到此问题并解决了吗?

2020-06-10 03:49:03.416 UTC [msp] loadCertificateAt -> WARN 001 Failed loading ClientOU certificate at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-06-10 03:49:03.418 UTC [msp] loadCertificateAt -> WARN 002 Failed loading PeerOU certificate at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-06-10 03:49:03.419 UTC [msp] loadCertificateAt -> WARN 003 Failed loading AdminOU certificate at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
2020-06-10 03:49:03.421 UTC [msp] loadCertificateAt -> WARN 004 Failed loading OrdererOU certificate at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem]: [could not read file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem: no such file or directory]
iCMS 回答:Hyperledger Fabric byfn.sh脚本无法加载证书

就Linux容器环境而言,您的路径描述无效。代替/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts\ca.org1.example.com-cert.pem应该是:

/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem

config.yaml文件中为创建的每个MSP相对指定了给定路径。您可以在那里验证。另外,请确保未更改默认的docker-compose文件。否则,除非正确修改,否则docker卷挂载将无法正常工作。

请执行./byfn.sh down,然后使用./byfn.sh up重新启动网络。

本文链接:https://www.f2er.com/2165545.html

大家都在问