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

Hyperledger fabric Hyperledger Fabric byfn.sh脚本加载证书失败,hyperledger-fabric,ibm-blockchain,Hyperledger Fabric,Ibm Blockchain,操作系统:Windows 10家庭版2004 64位 Docker版本:19.03.8 docker compose版本:1.25.5 使用./byfn.sh up启动网络时,我在加载通道创建、加入对等方以及查询对等方上的链码时遇到多个错误。有人经历过这个问题并解决了它吗 2020-06-10 03:49:03.416 UTC [msp] loadCertificateAt -> WARN 001 Failed loading ClientOU certificate at [/opt/g

操作系统:Windows 10家庭版2004 64位

Docker版本:19.03.8

docker compose版本:1.25.5

使用./byfn.sh up启动网络时,我在加载通道创建、加入对等方以及查询对等方上的链码时遇到多个错误。有人经历过这个问题并解决了它吗

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向下
,然后使用
/byfn.sh向上
再次启动网络

您好Chintan,谢谢您的快速回复。我执行了./byfn.sh关闭并重新启动了网络,但证书仍然无法加载,同样的错误仍然出现。我还检查了两个MSP的config.yaml文件,这是其中一个文件中的内容:NodeOUs:Enable:true clientointifier:Certificate:cacerts/ca.org2.example.com-cert.pem organizationalInitiatifier:client。。。顺便说一下,我正在使用Windows 10版本2004和Docker版本19.03.8,请在Windows环境变量中设置以下环境变量
COMPOSE\u CONVERT\u Windows\u PATHS=1
,或者在
结构示例/first network
目录中创建一个
.env
文件,并在其中写入上述变量。我在环境变量设置失败,但出现相同错误。请尝试使用Linux环境。您可以在Windows环境中使用Windows Linux子系统(WSL)。它至少对HLF非常有效。因为在单独使用Windows配置HLF时可能会遇到几个问题。谢谢您的建议!使用了WSL2并启用了docker WSL2后端,它的工作非常出色。