Orderer 服务筏共识领导问题

问题描述

我有一个 Hyperledger Fabric 网络,其中包含 3 个排序节点和 3 个对等节点。问题是排序节点试图无限期地选择领导者。

Config.txt 文件

config.txt

所有节点,已成功加入频道(所有节点返回相同的响应如下)

response when joining channel

orderer0.fabric.net 日志

orderer0.fabric.net log

orderer1.fabric.net 日志

orderer1.fabric.net log

orderer2.fabric.net 日志

orderer2.fabric.net log

当我尝试安装智能合约并初始化第一笔交易时出现问题。

smart contract issue

组件:

  • 订购者:hyperledger/fabric-orderer:2.3.2
  • CA:hyperledger/fabric-ca:1.5.0

解决方法

尝试修改你的 configtx.yaml 如下内容:

    EtcdRaft:
        Consenters:
        - Host: orderer.example.com
          Port: 7050
          ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
          ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
        - Host: orderer2.example.com
          Port: 7050
          ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
          ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
        - Host: orderer3.example.com
          Port: 7050
          ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
          ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt

可以发现所有的Port都设置为7050,然后重新生成genesis.block

从你的日志来看,raft选择不成功,所有节点仍然是pre候选状态