Hyperledger Fabric byfn.sh 脚本加载证书失败

Hyperledger Fabric byfn.sh script Failed Loading Certificates

OS: Windows 10 家庭版 2004 64 位

Docker版本:19.03.8

docker-撰写版本: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]

您的路径描述在 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重新启动网络。