Hyperledger fabric 无法在Hyperledger结构中分发专用集合

Hyperledger fabric 无法在Hyperledger结构中分发专用集合,hyperledger-fabric,hyperledger,blockchain,ibm-blockchain,Hyperledger Fabric,Hyperledger,Blockchain,Ibm Blockchain,我正在建立一个自定义Hyperledger Fabric v1.2区块链网络,其中有3个对等点和3个组织,使用私有数据收集。侧数据库是CouchDB。我使用fabric node sdk连接到区块链。chaincode实例化时没有任何错误,但无法调用将数据放入集合的chaincode方法 以下错误显示在实例化链码的对等方以及交易的背书对等方的docker日志中: > 2018-09-21 13:32:52.163 UTC [gossip/privdata] func1 -> ERRO

我正在建立一个自定义Hyperledger Fabric v1.2区块链网络,其中有3个对等点和3个组织,使用私有数据收集。侧数据库是CouchDB。我使用fabric node sdk连接到区块链。chaincode实例化时没有任何错误,但无法调用将数据放入集合的chaincode方法

以下错误显示在实例化链码的对等方以及交易的背书对等方的docker日志中:

> 2018-09-21 13:32:52.163 UTC [gossip/privdata] func1 -> ERRO 036 Failed disseminating private RWSet for TxID e2f0a03885bd31232042a19ff8a7eb36cef92f8a6ed24fcb0e3eed2f52b5c037 , namespace contract collection collection0 : Requested to send to at least 3 peers, but know only of 0 suitable peers.

>2018-09-21 13:32:52.163 UTC [gossip/service] DistributePrivateData -> ERRO 037 Failed to distributed private collection, txID e2f0a03885bd31232042a19ff8a7eb36cef92f8a6ed24fcb0e3eed2f52b5c037 channel coachannel due to Failed disseminating 1 out of 1 private RWSets
请注意,集合所需的对等计数为3。显然,即使每个对等方都有自己的couchdb容器,数据也不会存储在背书对等方本身的side db中

couchdb容器记录如下错误。除此之外,它们似乎工作正常

>[notice] 2018-09-21T16:26:38.406978Z nonode@nohost <0.318.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:403) <= mem3_shards:load_shards_from_disk/1(line:378) <= mem3_shards:load_shards_from_disk/2(line:407) <= mem3_shards:for_docid/3(line:91) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2018-09-21T16:26:38.407028Z nonode@nohost emulator -------- Error in process <0.319.0> with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,378}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,407}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,91}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}

[通知]2018-09-21T16:26:38.406978Znonode@nohost-----chttpd_auth_cache changes侦听器死亡数据库_在mem3_shards中不存在:从_db/6(第403行)加载_shards_要使私有数据收集工作,您需要设置跨组织的八卦。这意味着您需要确保将每个组织的锚节点添加到您的渠道配置中。您可以在文档中找到所有必需的信息,但在较高级别上,您需要在每个组织的configtx.yaml文件中添加锚节点,然后在运行订购服务并创建频道后,每个组织都需要执行频道更新以添加锚节点。指导您完成这些步骤。

为了让私人数据收集工作,您需要设置跨组织的八卦。这意味着您需要确保将每个组织的锚节点添加到您的渠道配置中。您可以在文档中找到所有必需的信息,但在较高级别上,您需要在每个组织的configtx.yaml文件中添加锚节点,然后在运行订购服务并创建频道后,每个组织都需要执行频道更新以添加锚节点。引导您完成这些步骤。

感谢您提供的非常有用的提示!事实上,频道没有更新以包括锚节点。现在它很好用。好极了。。。很高兴为您提供帮助噢,非常感谢@GariSingh我花了整个周末的时间来解决这个问题,最后我通过在启动网络后“仅仅”运行更新来解决它。您如何使用node sdk添加锚节点?我了解如何使用cli容器来实现这一点,但我希望使用node实现自动化sdk@Moriarty,看一看,谢谢你给我这个非常有用的提示!事实上,频道没有更新以包括锚节点。现在它很好用。好极了。。。很高兴为您提供帮助噢,非常感谢@GariSingh我花了整个周末的时间来解决这个问题,最后我通过在启动网络后“仅仅”运行更新来解决它。您如何使用node sdk添加锚节点?我了解如何使用cli容器来实现这一点,但我希望使用node实现自动化sdk@Moriarty,看看