0
votes

I started the network using byfn.sh. Then trying to add a new peer to the network. First extended the peers after modifying crypto-config.yaml- Template: Count: 3 Then created a new yaml file with the extra peer config. Config at end. Then from inside cli container - peer channel join -b mychannel.block

new peer yaml config

version: "2"

volumes: peer2.org1.example.com:

networks: byfn:

services: peer2.org1.example.com: container_name: peer2.org1.example.com extends: file: base/peer-base.yaml service: peer-base environment: - CORE_PEER_ID=peer2.org1.example.com - CORE_PEER_ADDRESS=peer2.org1.example.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2.org1.example.com:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 - CORE_PEER_LOCALMSPID=Org1MSP volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp:/etc/hyperledger/fabric/msp - ./crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/tls:/etc/hyperledger/fabric/tls - peer2.org1.example.com:/var/hyperledger/production ports: - 11051:7051 - 11053:7053

I expected- successful join. But in logs of peer2.org1 i am seeing warning- [gossip/discovery] func1 -> WARN 04e Could not connect to {peer0.org1.example.com:7051 [] [] peer0.org1.example.com:7051 } : context deadline exceeded

I have a vague idea that i need to add something for DSN discovery somewhere, but not sure where. Please help.

1

1 Answers

0
votes

Add your new peer into the CORE_PEER_GOSSIP_BOOTSTRAP enviroment variable of peer0.org1.example.com in the docker-compose.yaml, should be like this:

CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 peer2.org1.example.com:7051

Don't forget to restart your containers