Reputation: 55
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
Upvotes: 2
Views: 1238
Reputation: 726
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.
Upvotes: 1