Hyperledger fabric 从早期备份中恢复订购方会导致与对等方的一致性问题

Hyperledger fabric 从早期备份中恢复订购方会导致与对等方的一致性问题,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,我仍然是个笨蛋,所以,请原谅我误解了一些基本知识 我有一个HLF1.4.2集群在GKE中运行,有3个订购者(raft)和3个组织(每个组织2个对等点)。几天前,订购方的pvc磁盘已满,所有订购开始失败。由于我无法扩展live volume,我缩小了订购者的规模,从PVC中取出数据,并在扩展的卷上恢复 在恢复卷时,我在恢复卷数据后立即启动了每个订购者。因此,当第二个订购方启动时,订购方获得了仲裁,对等方开始编写。因此,当第三个订购者出现时,它拒绝加入集群,出现以下错误 2020-08-25 13:

我仍然是个笨蛋,所以,请原谅我误解了一些基本知识

我有一个HLF1.4.2集群在GKE中运行,有3个订购者(raft)和3个组织(每个组织2个对等点)。几天前,订购方的pvc磁盘已满,所有订购开始失败。由于我无法扩展live volume,我缩小了订购者的规模,从PVC中取出数据,并在扩展的卷上恢复

在恢复卷时,我在恢复卷数据后立即启动了每个订购者。因此,当第二个订购方启动时,订购方获得了仲裁,对等方开始编写。因此,当第三个订购者出现时,它拒绝加入集群,出现以下错误

2020-08-25 13:17:33.891 UTC [orderer.consensus.etcdraft] Step -> INFO a2d 2 [term: 2] received a MsgHeartbeat message with higher term from 1 [term: 4] channel=mychannel node=2
2020-08-25 13:17:33.892 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO a2e 2 became follower at term 4 channel=mychannel node=2
2020-08-25 13:17:33.892 UTC [orderer.consensus.etcdraft] commitTo -> PANI a2f tocommit(19) is out of range [lastIndex(17)]. Was the raft log corrupted, truncated, or lost? channel=mychannel node=2
panic: tocommit(19) is out of range [lastIndex(17)]. Was the raft log corrupted, truncated, or lost?
2020-08-26 11:03:46.482 UTC [gossip.state] deliverPayloads -> PANI 03f Cannot commit block to the ledger due to unexpected Previous block hash. Expected PreviousHash = [3e39ea03143fdb09a14fb92b6b429236f57dbe52acbeac9c797f6ebdeef1aa79], PreviousHash referred in the latest block= [1823042217af3f7836e7b6d9b933dc9c008fc71f85e5465c62b78217194a6b3a]
因为我不知道如何恢复,我决定用我以前的备份恢复所有的3个订购者。恢复后,所有订购方已成功返回仲裁,但多个对等方开始给出以下错误

2020-08-25 13:17:33.891 UTC [orderer.consensus.etcdraft] Step -> INFO a2d 2 [term: 2] received a MsgHeartbeat message with higher term from 1 [term: 4] channel=mychannel node=2
2020-08-25 13:17:33.892 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO a2e 2 became follower at term 4 channel=mychannel node=2
2020-08-25 13:17:33.892 UTC [orderer.consensus.etcdraft] commitTo -> PANI a2f tocommit(19) is out of range [lastIndex(17)]. Was the raft log corrupted, truncated, or lost? channel=mychannel node=2
panic: tocommit(19) is out of range [lastIndex(17)]. Was the raft log corrupted, truncated, or lost?
2020-08-26 11:03:46.482 UTC [gossip.state] deliverPayloads -> PANI 03f Cannot commit block to the ledger due to unexpected Previous block hash. Expected PreviousHash = [3e39ea03143fdb09a14fb92b6b429236f57dbe52acbeac9c797f6ebdeef1aa79], PreviousHash referred in the latest block= [1823042217af3f7836e7b6d9b933dc9c008fc71f85e5465c62b78217194a6b3a]
  • 有可能从这种状态恢复吗
  • 官方的备份和恢复文档没有讨论订购方和对等账本数据之间的依赖关系。所以,如果我正在进行备份,获得一致数据备份的唯一方法是在进行备份之前停止订购方和对等方,对吗
  • 我比较了3个订购者的备份,所有3个备份上的文件看起来都一样,那么,我可以从一个订购者的备份中恢复所有3个订购者吗
  • 似乎当您恢复订购者时,您没有恢复对等者。因此,现在对等方比订购方拥有更多的块。您应始终确保对等方的区块高度与订购方相同或更低。如果是一样的话,那太好了,没什么可做的。如果它较低,那么它将从订购方提取较新的块

  • 是的,建议在进行备份之前停止订购方和对等方

  • 我不确定。可能需要其他高频专家的参与