Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

I installed the Fabric codebase from the Hyperledger project by following the instructions and was able to run the peer by using the ./peer peer command.

Peer supports finding out other peers running on the network. Right now Fabric supports running Peers on the same machine using Docker and running them -

Instead of running on same machine - I setup a Peer on another machine (a Mac Mini) and ran the command ./peer network from one of the machines - it did not discover anything.

My question is how to configure to discover Fabric Peers on the local network?

There is configuration on discovery in the core.yaml file but not clear how to enable it.

1 Answer

0 votes
by (14.4k points)

When the second peer is set up, the correct address of the first peer should be put in the CORE_PEER_DISCOVER_ROOTNODE parameter. 

docker run --rm -it -e CORE_VM_ENDPOINT= -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE= hyperledger-peer peer peer

If the code is being run in different machines, there lies a possibility that you'll have to forward ports. And if you are running the peer inside Vagrant you'll need to forward Vagrant ports too.  

Browse Categories