I am trying to set up a network using hyper ledger composer, for which I followed the Developer tutorial for creating a Hyperledger Composer solution but when I use the com
I had same error, I found out that the pre-requisities that I have already installed in my system didnot matched the versions. So I uninstalled the pre-requisities and reinstalled them. In my case the version of docker was creating a problem.
1) I had the same error while starting the network. This solution helped me: https://github.com/hyperledger/composer/issues/3591#issuecomment-386718739
It states the following:
There is an extra character when you copy the string from hyperledger composer website.
Try copy pasting the following line to a notepad and paste in the command line. It will work.
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
2) If it doesn't help, then try to kill any stale or active docker containers.
Run the following command to kill any stale or active containers:
docker rm -f $(docker ps -aq)
Clear any cached networks:
Press y
when prompted by the command
docker network prune
Then, go to ~/fabric-dev-servers
folder and run the commands:
cd ~/fabric-dev-servers
./teardownFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
After that, run the composer network install command:
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
Are you behind a proxy / firewall ? If so in the composer network install
command you require a -o npmrcFile
parameter, to resolve the NPM registry. eg registry=https://mycompanynpmregistry.com:4873
(or the resolved IP address) as in composer network install -c PeerAdmin@hlfv1 -a digitalproperty-network.bna -o npmrcFile=/tmp/npmrcFile
. See https://hyperledger.github.io/composer/latest/managing/connector-information
If you are finding that you get a REQUEST_TIMEOUT on a start or upgrade request, you could try increasing the timeout of the fabric default for startup timeout.
If you are using our simple Hyperledger Composer development server environment from composer-tools
github repo, then you can add the following to the peer definition to see if it addresses the problem:
in the file ~/fabric-tools/fabric-scripts/hlfv11/composer/docker-compose.yml
eg, the above is a snippet from the peer definition. You would have to do a docker-compose stop
- then docker-compose start
from that directory location to take effect.
Footnote:
In addition to CORE_CHAINCODE_STARTUPTIMEOUT change above - you MUST ALSO UPDATE the timeout values to match (ie CORE_CHAINCODE_STARTUPTIMEOUT), in the connection.json
file for the card(s) that performs the composer network start command (eg. PeerAdmin card in $HOME/.composer). You will see 4 timeouts (3 for a Peer and 1 for the Order) in the 'client' section, under the stanza "connection". By default, these are set to 300 seconds - Increase the value to 1200
for each. Do note that CORE_CHAINCODE_STARTUPTIMEOUT must have the 'trailing s' , whereas these 4 timeouts defined above - don't have this.