首页 > 解决方案 > 网络中是否可以有一个对等组织?

问题描述

我正在建立一个小架构来使用 Hyperledger Fabric 测试一些东西。

有 3 个 Orgs,其中 2 个由每个对等点组成(可用性不是测试的主要关注点),我收到一些关于八卦的警告:无法与 0.0.0.0:7051 建立连接,对于两个单个对等点都相同.

   2019-10-02 15:18:49.667 UTC [gossip.discovery] func1 -> WARN 02e Could not 
   connect to Endpoint: 127.0.0.1:7051, InternalEndpoint: 127.0.0.1:7051, 
   PKI ID: <nil>, Metadata:  : context deadline exceeded

我开始怀疑只有一个对等的 Org 是否至少是可行的,找不到任何关于如何在 docker-compose.yaml 中选择 env 设置的示例或任何指南,或者任何表明你不能拥有单一的同行组织。

有什么提示吗?

谢谢

标签: hyperledger-fabric

解决方案


warning on gossip: can't establish connection with 0.0.0.0:7051

是因为你没有更新锚点交易,请通过提供anchor.tx来更新交易

检查:https ://hyperledger-fabric.readthedocs.io/en/release-1.1/glossary.html#anchor-peer

Anchor peers 用于建立跨组织通信

生成anchorpeer.tx的命令:

configtxgen -outputAnchorPeersUpdate anchor_peer_tx.pb -profile SampleSingleMSPChannelV1_1 -asOrg Org1

将配置更新事务输出到 anchor_peer_tx.pb,它根据 configtx.yaml 为组织 Org1 设置锚点,如配置文件 SampleSingleMSPChannelV1_1 中定义的那样。


推荐阅读