1

I've created a network with 2orgs each one with 2peers and 1ca.

After creating the network, the error that I get is:

peer0.org2.example.com|2020-01-30 06:30:18.279 UTC [gossip.comm] func1 -> WARN 048 peer0.org1.example.com:7051, PKIid:5a9ed9a3592dd14008b90c942f302ef06aa590060ee281d4750ebb1b76dd2e5e isn't responsive: EOF
peer0.org2.example.com|2020-01-30 06:30:18.279 UTC [gossip.discovery] expireDeadMembers -> WARN 049 Entering [5a9ed9a3592dd14008b90c942f302ef06aa590060ee281d4750ebb1b76dd2e5e]
peer0.org2.example.com|2020-01-30 06:30:18.279 UTC [gossip.discovery] expireDeadMembers -> WARN 04a Closing connection to Endpoint: peer0.org1.example.com:7051, InternalEndpoint: , PKI-ID: 5a9ed9a3592dd14008b90c942f302ef06aa590060ee281d4750ebb1b76dd2e5e, Metadata: 
peer0.org2.example.com|2020-01-30 06:30:18.280 UTC [gossip.discovery] expireDeadMembers -> WARN 04b Exiting

for all peers

I've set the gossip parameters (in docker-compose.yml) like that:

peer0.org1.example.com with port 7051:

- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:10051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false

peer1.org1.example.com with port 10051

- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:10051
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false

peer0.org2.example.com with port 8051:

- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:9051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:8051
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false

peer1.org2.example.com with port 9051

- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:9051
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false

After removing the external endpoints I don't see these errors.

If I get it right the bootstrap makes the port public for the peers inside the org to communicate and the external endpoint makes the port public so peers can communicate with peers in different orgs. Isn't that right?

Thanks in advance

1 Answers1

1

You are inserting uncorrect values in your variables.

Taking in example peer0org1, CORE_PEER_GOSSIP_EXTERNALENDPOINT should contain peer0org1 address and this is the address in which your peer listen for gossip events. CORE_PEER_GOSSIP_BOOTSTRAP should instead point to another peer with gossip external endpoint activated, in your case the one from org2

So it should be: peer0.org1.example.com with port 7051:

- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:8051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false

peer0.org2.example.com with port 8051:

- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:8051
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false

In this way peers should connect each other and start an election.

In your specific case, you cannot let them communicate because they are from different organization. Mine was just an example but you can use it to adapt to your solution. You do not need gossi if you have 1 peer for organization, but if you do have 2 peers for org you can let them communicate as I said.

Riki95
  • 706
  • 1
  • 7
  • 16
  • didn't work the error now is Could not connect to Endpoint: peer0.org1.example.com:7051, InternalEndpoint: peer0.org1.example.com:7051, PKI-ID: , Metadata: : peer0.org1.example.com:7051 isn't in our organization, cannot be a bootstrap peer – Giorgos Niotis Jan 30 '20 at 09:40
  • 1
    Sure, because you can enable peer gossip only between peers of the same organization. So you should create 2 peers under org1 and let them communicate, same for Org2. I've added an edit to my answer :) – Riki95 Jan 30 '20 at 13:37
  • I've edited the question for 2peers in each org. Could you plz edit your answer and tell me how to set them up.Thanks – – Giorgos Niotis Jan 30 '20 at 19:19
  • Still closing connection to all peers one by one. – Giorgos Niotis Feb 01 '20 at 23:39