首页 > 解决方案 > 无法从对等方获取私有数据(空成员) - Hyperledged Fabric 1.4.6

问题描述

我遇到了一个 1.4.6 Fabric 网络的问题,该网络有一个网络(27 个对等点和 5 个排序节点),其中一个组织中有一个对等点(锚点对等点)停止提交事务。我不明白为什么它在没有任何网络更新的情况下就开始显示此消息,但在此之前它工作正常。

消息是:

2020-08-26 19:56:35.147 UTC [gossip.privdata] fetchPrivateData -> WARN fc2 Do not know any peer in the channel( xxxx ) that matches the policies , aborting
2020-08-26 19:56:35.147 UTC [gossip.privdata] fetchFromPeers -> WARN fc3 Failed fetching private data for block 743444 from peers: Empty membership
2020-08-26 19:56:36.149 UTC [gossip.privdata] fetchPrivateData -> WARN fc4 Do not know any peer in the channel( xxxx ) that matches the policies , aborting

我已经尝试更新所有对等点的链码以查看是否有变化,但即使所有其他对等点都已更新并仍在使用它们各自的 PDC,这个也停止更新链码。

我知道我们应该配置其他对等点来传播 pvt 数据,但不幸的是我们没有这样做,现在我需要找到一种方法让这个对等点再次工作。所有其他 26 都很好,并且它们都具有相同的配置(仅更改组织)。任何人都可以帮助我找到一种方法来让这个对等方接受并提交新事务,即使它会导致一些 pvt 数据丢失?

编辑以获取更多信息。当我尝试为此对等方发送新交易时,会发生以下情况:

2020-08-28 17:29:07.018 UTC [endorser] callChaincode -> INFO 3c0b [channel][6b3e2fcc] Entry chaincode: name:"chaincode"
2020-08-28 17:29:07.022 UTC [endorser] callChaincode -> INFO 3c0c [channel][6b3e2fcc] Exit chaincode: name:"chaincode"  (4ms)
2020-08-28 17:29:07.033 UTC [comm.grpc.server] 1 -> INFO 3c0d unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.21.0.4:40998 grpc.code=OK grpc.call_duration=17.194301ms
2020-08-28 17:29:53.670 UTC [gossip.privdata] StoreBlock -> WARN 3c2f [channel] Could not fetch all missing collection private write sets from remote peers. Will commit block [744876] with missing private write sets:[txID: bdeb55aa80d4c2a2f615abeefe0dbb97a60a08babb5ef2a1f9a0627fe4bf2ccb, seq: 0, namespace: chaincode, collection: collectionTestResults, hash: e0cde0ce12a35de1e7628e9283b26e20849ea5e112ef0daeb8a5a6d7aa1a1706
txID: f505a249ca1c4136711c8402cb2333a2e1b59cb02b573749f4c9488194e3a682, seq: 1, namespace: chaincode, collection: collectionTestResults, hash: ca65f8ed487f7e06201f25a7e0872c522afcb54c1c64c137cec8ef1d31e56d6d
txID: 3032cc2c4ce4702ef1ec0da28ca7e5a0bd4b2c4604915704ae63fc9d8342c138, seq: 2, namespace: chaincode, collection: collectionTestResults, hash: 35c4be3879a191f9e2f132188b313bf4f297e2881e4ad6149c40708191d972fb
]
2020-08-28 17:29:53.675 UTC [statebasedval] ValidateAndPrepareBatch -> WARN 3c30 Block [744876] Transaction index [0] TxId [bdeb55aa80d4c2a2f615abeefe0dbb97a60a08babb5ef2a1f9a0627fe4bf2ccb] marked as invalid by state validator. Reason code [MVCC_READ_CONFLICT]
2020-08-28 17:29:53.675 UTC [statebasedval] ValidateAndPrepareBatch -> WARN 3c31 Block [744876] Transaction index [1] TxId [f505a249ca1c4136711c8402cb2333a2e1b59cb02b573749f4c9488194e3a682] marked as invalid by state validator. Reason code [MVCC_READ_CONFLICT]
2020-08-28 17:29:53.699 UTC [kvledger] CommitWithPvtData -> INFO 3c32 [channel] Committed block [744876] with 3 transaction(s) in 29ms (state_validation=4ms block_and_pvtdata_commit=4ms state_commit=19ms) commitHash=[128eff402fae08d58f50e6529e8e9903116374cac557901bad4fd666153c55aa]

之后,我查询了这个特定文档的分类帐,查看了 couchdb,但他没有添加到世界状态或 PDC。

另一件可疑的事情是他的块远远落后于排序者,但他似乎并没有获取它们,他正常接受查询,甚至提交不使用此 PDC 的事务。

标签: hyperledger-fabrichyperledger

解决方案


如果 gossip 层在网络中找不到可以访问此集合的任何其他对等点,您将收到此错误。检查对等日志中的八卦“成员视图”消息。这些消息将说明该对等点知道哪些其他对等点。如果您没有看到此类消息,请重新启动对等点,以便您可以在日志中看到其他对等点显示在新的“成员身份视图”消息中。

通常这些问题与 gossip 配置有关 - 仔细检查您的配置值:

peer.gossip.bootstrap

peer.gossip.endpoint

peer.gossip.externalEndpoint

并确保 peer 可以访问 bootstrap peer 地址,并且组织中的其他 peer 可以通过端点地址访问这个 peer,并且其他组织中的其他 peer 可以通过 externalEndpoint 地址访问这个 peer。

一旦您的对等点连接到属于同一集合的另一个对等点,它将协调(检索)在此期间丢失的私有数据。


推荐阅读