从与我相同的PKI-ID的对等方接收到AliveMessage [英] Received AliveMessage from a peer with the same PKI-ID as myself
问题描述
我正在尝试将Hyperledger Fabric入门移植到Kubernetes.但是,我一直在努力部署peer1
.如果启用CORE_PEER_GOSSIP_BOOTSTRAP
,则会收到错误消息从与自己具有相同PKI-ID的对等方接收到AliveMessage".
I am attempting to port the Hyperledger Fabric Getting Started to Kubernetes. But am struggling to get peer1
's to deploy. If I enable CORE_PEER_GOSSIP_BOOTSTRAP
, I receive errors "Received AliveMessage from a peer with the same PKI-ID as myself".
如何调试据称与另一个具有相同PKI-ID的同位体?
How can I debug a peer reportedly having the same PKI-ID as another?
以此为起点:
https://hyperledger-fabric.readthedocs.io/en/latest /getting_started.html
我能够创建:
-
orderer
和cli
吊舱 -
peer0
在每个org1
|org2
名称空间中都是一个. -
peer1
,但仅当我禁用(注释掉)CORE_PEER_GOSSIP_BOOTSTRAP
时
default
名称空间中的orderer
andcli
pods indefault
namespacepeer0
's one in eachorg1
|org2
namespace.peer1
's but only if I disable (comment out)CORE_PEER_GOSSIP_BOOTSTRAP
如果为peer1
启用CORE_PEER_GOSSIP_BOOTSTRAP
,则会收到以下警告和错误:
If I enable CORE_PEER_GOSSIP_BOOTSTRAP
for the peer1
's, I receive the following warning and error:
[gossip/gossip#10.0.0.10:7051] NewGossipService -> WARN 01c External endpoint is empty, peer will not be accessible outside of its organization
...
[gossip/discovery#10.0.0.10:7051] handleAliveMessage -> ERRO 02a Bad configuration detected: Received AliveMessage from a peer with the same PKI-ID as myself: tag:EMPTY alive_msg:<membership:<pki_id:"[[REDACTED]]" > timestamp:<inc_number:1495468533769417608 seq_num:416 > >
为了更好地将Orderer
,Peers
映射到DNS名称,我使用Kubernetes命名空间和以下配置:
In order to better map the Orderer
, Peers
to DNS names, I'm using Kubernetes Namespaces and this configuration:
OrdererOrgs:
- Name: Orderer
Domain: default.svc.cluster.local
Specs:
- Hostname: orderer
PeerOrgs:
- Name: Org1
Domain: org1.svc.cluster.local
Template:
Count: 2
Users:
Count: 2
- Name: Org2
Domain: org2.svc.cluster.local
Template:
Count: 2
Users:
Count: 2
为了向组织中的其他对等方公开peer0
,并公开orderer
,我为peer0
提供了ClusterIP
服务(仅选择peer0
)和orderer
.它不雅致,但我想让它正常工作,然后才能使其更美观.
In order to expose the peer0
's to the other peers in the org and to expose the orderer
, I have ClusterIP
services for the peer0
's (selecting only the peer0
's) and orderer
. It's inelegant but I'm trying to get it to work before I get it working more beautifully.
我能够使用nslookup在部署为群集上默认设置的Pod中解析orderer.default.svc.cluster.local
,peer0.org1.svc.cluster.local
,`peer0.org2.svc.cluster.local'.
I am able to resolve orderer.default.svc.cluster.local
, peer0.org1.svc.cluster.local
, `peer0.org2.svc.cluster.local' using nslookup from within a pod deployed to default on the cluster.
没有gPRC的卷曲工具,我能够针对7051
和7053
上的这些端点打开套接字.
Absent a curl-like tool for gPRC, I am able to open sockets against these endpoints on 7051
and 7053
.
推荐答案
首先,请确保您使用的证书正确.
其次,确认您正确设置了gossip
的环境/配置
First, make sure you are using the right certificates.
Second, verify that your environment/configuration for gossip
is set correctly
environment:
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7051
core.yaml中的
OR in core.yaml
peer:
gossip:
bootstrap: peer0.org1.example.com:7051
externalEndpoint: peer1.org1.example.com:8051
endpoint: peer0.org1.example.com:7051
已还请确保已正确设置 CA
Edited: Also make sure that you have properly setup your CA
希望这对我有帮助.而且我成功地建立了对等关系.
Hope this helps, it worked for me. And I was successfully able to connect peers.
这篇关于从与我相同的PKI-ID的对等方接收到AliveMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!