Simple Steps To Run Hyperledger Fabric Composer Network With Multiple Organization


(S//Bot) #1

I’ve created a sample project with the help of composer’s multi organization tutorial (https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-multi-org.html) And here I’ll be talking about how to use my scripts and the things to be remembered while setting up the composer profiles and network cards.

Setting up the project

As the first step, clone our sample Repo from Github.

git clone https://github.com/skcript/hyperledger-fabric-composer-multiorg-sample

This has everything already setup and you just need to run the below mentioned scripts for getting it up and running.

Script to start the network

Here is the collection scripts that are extracted from the composer’s official documentation for running multi organization fabric.

./destroy.sh  # This is to remove the docker images.
./stop.sh
./byfn.sh -m generate
./byfn.sh -m up -s couchdb -a
./init.sh

Points To Remember

  1. Make sure that you’ve generated your own certificates with ./byfn.sh -m generate
  2. Replace the certificates path in all the composer card create steps of init.sh
  3. Later if you want to create customized domain and organization names edit the docker compose files of byfn

In my future articles, I’ll write about how to run it in multiple host machines with corresponding scripts.


This is a companion discussion topic for the original entry at https://www.skcript.com/svr/simple-steps-to-run-hyperledger-fabric-composer-network-with-multiple-organization/

(Waqas Khan) #2

“In my previous article, I wrote about how to run Hyperledger Fabric with multiple peers running in different physical machines”

can we have a link to this article please?


(Karthik Kamalakannan) #3

Hi @Waqas_Khan,
Here’s the link to that article:


(Munesh Rawat) #4

Hi Karthik,
i have done the multi node setup on hyperledger fabric netwok…and its working fine for manager node …but when i m going to join channel for Org2 (worker node)…getting error

: # ==================================================== # JOIN peer0.org2.example.com TO THE CHANNEL mychannel. # ==================================================== 
docker exec -e "CORE_PEER_LOCALMSPID=Org2MSP" -e "CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt" -e "CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key" -e "CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp" -e "CORE_PEER_ADDRESS=peer0.org2.example.com:7051" "$CLI_NAME" peer channel join -b "$CHANNEL_NAME".block --tls --cafile $ORDERER_CA 

2018-11-12 07:26:54.800 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 
2018-11-12 07:26:54.800 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 
2018-11-12 07:26:55.019 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.org2.example.com on 127.0.0.11:53: no such host"; Reconnecting to {peer0.org2.example.com:7051 <nil>} 
2018-11-12 07:26:55.810 UTC [grpc] Printf -> DEBU 004 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.org2.example.com on 127.0.0.11:53: no such host"; Reconnecting to {peer0.org2.example.com:7051 <nil>} 
2018-11-12 07:26:57.358 UTC [grpc] Printf -> DEBU 005 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup peer0.org2.example.com on 127.0.0.11:53: no such host"; Reconnecting to {peer0.org2.example.com:7051 <nil>} Error: Error getting endorser client channel: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded

(Varun Raj) #5

Looks like the peer is not reachable by the other peer, Have you mapped the DNS of the peer in docker compose?