【问题标题】:HYperledger Fabric Building First NetworkHYperledger Fabric 构建第一个网络
【发布时间】:2021-09-12 17:07:17
【问题描述】:

在尝试使用 Windows 构建第一个网络时,此错误不断出现!

错误:无法获取客户端 TLS 配置:无法读取 'C:\c\Users\User\fabric-samples\test-network\organizations\peerOrganizations\org1.example.com\c\Users\User\fabric -samples\test-network\organizations\fabric-ca\org1\tls-cert.pem':打开 C:\c\Users\User\fabric-samples\test-network\organizations\peerOrganizations\org1.example.com\ c\Users\User\fabric-samples\test-network\organizations\fabric-ca\org1\tls-cert.pem:系统找不到指定的路径。 organizations/fabric-ca/registerEnroll.sh:第 26 行:/c/Users/User/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/msp/config.yaml:没有这样的文件或目录

[错误读取配置:不支持的配置类型“” 2021-09-12 20:49:43.710 +06 [common.tools.configtxgen] func1 -> ERRO 003 找不到 configtx.yaml。请确保将 FABRIC_CFG_PATH 或 -configPath 设置为包含 configtx.yaml 的路径

  • 分辨率=1 无法生成 orderer 创世块... ]1

【问题讨论】:

  • 谁能帮忙解决FABRIC_CFG_PATH?
  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: docker-compose hyperledger-fabric blockchain hyperledger-chaincode ibm-blockchain


【解决方案1】:

几个小时前我遇到了同样的问题,我遵循了错误消息中给出的建议,我通过了这个问题,但在我尝试运行 ./network.sh createChannel 命令时遇到了另一个问题,所以我不得不选择使用 WSL。

请确保 FABRIC_CFG_PATH

network.sh 文件中的路径已正确设置,因此无需对第一个建议执行任何操作。

或 -configPath 设置为包含 configtx.yaml 的路径

我遵循第二个建议,将-configPath ./configtx 添加到network.sh 文件中createConsortium() 方法的命令中。该命令看起来像下面的代码,但就像我说我无法让它工作所以我不得不在 WSL 上做它

configtxgen -configPath ./configtx -profile TwoOrgsOrdererGenesis -channelID system-channel -outputBlock ./system-genesis-block/genesis.block

【讨论】:

    【解决方案2】:

    将FABRIC_CFG_PATH设置为configtx.yaml的路径。

    【讨论】:

    • 您可能需要解释为什么需要这样做。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-29
    • 1970-01-01
    • 2018-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多