Hyperledger composer network install

2020-05-03 01:21发布

问题:

Hi I'm having problem when trying to composer network install

Installing business network. This may take a minute... Error: Error trying install business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed

composer network install

回答1:

Make sure docker is running

From their documentation, Installing pre-requisites

Docker is required.

Then try docker ps, check if the peer node/s is listed.

Then try to ping your network with composer network ping --card admin@<some_network>



回答2:

  1. Check if docker login is working. If not,

    docker-machine ssh default
    sudo vi /etc/resolv.conf
    

    change nameserver to 8.8.8.8

  2. Using composer-cli at v0.19.5 Add this in fabric-scripts\hlfv11\createPeerAdminCard.sh

    CYGDIR="$(cygpath -pw "$DIR")"
    if [[ ! -v DOCKER_HOST ]]; then
    echo "DOCKER_HOST is NOT set <<<< Please set the env for Docker !!!!"
    DOCKER_IP="localhost"
    else
    DOCKER_IP="${DOCKER_HOST:6}"
    INDEX=`expr index "${DOCKER_IP}" :`
    echo $INDEX
    DOCKER_IP="${DOCKER_IP:0:(INDEX-1)}"
    fi
    echo  "Using the Docker VM IP Address: ${DOCKER_IP}"
    

    And replaced every localhost in the file with $DOCKER_IP