1
votes

I am following the tutorial given here that shows how to build a basic business network using assets,transactions and participants. I am not able to deploy the business network archive(.bna) file to my running hyperledger fabric instance using the command:

composer network deploy -a my-network.bna -p hlfv1 -i admin -s adminpw

I am getting an error as shown in this image:

image

I have installed all the tools as required and mentioned on hyperledger.github.io/composer/installing/development-tools.html with the correct versions.

Any help would be much appreciated.

2
Would suggest you paste the text rather than an image. Looking at the image would suggest the fabric you are trying to connect to is not running or not available. - david_k
Please can you paste in the output of docker ps -a and cat ~/.composer-connection-profiles/hlfv1/connection.json so we can check the settings? - Simon Stone

2 Answers

0
votes

Not run into this before, but just comparing the command you've written to what I've done before when deploying the .bna file, can you try using 'PeerAdmin' and 'randomString' as the secret instead of 'admin' and 'adminpw'?

0
votes

I never used composer network deploy in my local fabric. I used below commands and it works for me. You can give it also a try.

d ~/
cd ~/fabric-dev-servers
sudo ./stopFabric.sh
sudo ./teardownFabric.sh
sudo ./startFabric.sh
./createPeerAdminCard.sh

cd ~/yournetworkfolder
composer archive create -t dir -n .

composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]
composer network start --networkName yournetworkname --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card
composer card import --file networkadmin.card
composer network ping --card admin@nameofyournetwork