Hyperledger Composer Troubleshooting
Sep 7, 2018 · 3 min read
This is a live document that I will be keep updating to troubleshoot the Hyperledger Composer.
Problem statement:
When you click “Connect now”, you can’t connect the network
Error message:
Error: Error trying to ping. Error: Failed to connect before the deadline

Resolution:
- I presume you already have the business network archive (.bna) file and business network card (.card) in your folder. If not, please follow this link to generate those files: https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial.html
- Stop and tear down the fabric:
~/fabric-dev-servers/stopFabric.sh~/fabric-dev-servers/teardownFabric.sh

- Remove the previous docker containers:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)- Start the Fabric and create the Peer Admin card:
~/fabric-dev-servers/startFabric.sh
~/fabric-dev-servers/createPeerAdminCard.sh
- If you trying to ping now, you will get this message:

- Navigate to the folder where you kept the .bna and .card files.

- Install the business network archive (.bna):
composer network install --card PeerAdmin@hlfv1 --archiveFile tutorial-network@0.0.1.bna
- Start the business network:
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
- Ping the network:
composer network ping --card admin@tutorial-network
- Now click “Connect now”, you will get the message “refreshing the connection to …”. And you are connected to the network now.

Hope that helps!
