kshitijyelpale / blockchain-hyperledger-fabric-electronic-patient-records

GNU General Public License v3.0
49 stars 43 forks source link

Error when issue command ./addHosp3 deployCC #64

Open gnurtcouq opened 2 years ago

gnurtcouq commented 2 years ago

Hi,

When I tried to add Hosp3 , there is error:

./addHosp3 up => OK, no error

./addHosp3 deployCC

............. ========= Getting hosp3 on to your hospital network =========

Fetching channel config block from orderer...

ERROR !!!! Unable to have Hospital 3 peers join network

Any advice how to fix this?

tim5chneider commented 1 year ago

You must add the .env-file in the addHosp3 folder to the addHosp3.sh. Without this entry Hosp3 and their components are running in another docker-network.

Code should be adjust like (look at line 142):

function Hosp3Up () {
  # start Hospital 3 nodes
  if [ "${DATABASE}" == "couchdb" ]; then
    IMAGE_TAG=${IMAGETAG} docker-compose --env-file ./.env -f $COMPOSE_FILE_ORG3 -f $COMPOSE_FILE_COUCH_ORG3 up -d 2>&1
  else
    IMAGE_TAG=$IMAGETAG docker-compose --env-file ./.env -f $COMPOSE_FILE_ORG3 up -d 2>&1
  fi
  if [ $? -ne 0 ]; then
    echo "ERROR !!!! Unable to start Hospital 3 network"
    exit 1
  fi
}