0
votes

Composer Version: 0.19.0

Mac OS

Steps:

  • remove all images of docker
  • rm -rf ~/.composer
  • download the fabric-tools from network
  • ./teardownFabric.sh
  • ./createPeerAdminCard.sh
  • ./startFabric.sh

  • docker ps:

    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 504b51337d01 hyperledger/fabric-peer:x86_64-1.1.0 "peer node start" 17 minutes ago Up 17 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com db82f914091d hyperledger/fabric-orderer:x86_64-1.1.0 "orderer" 17 minutes ago Up 17 minutes 0.0.0.0:7050->7050/tcp orderer.example.com efcdff601fec hyperledger/fabric-couchdb:x86_64-0.4.6 "tini -- /docker-ent…" 17 minutes ago Up 17 minutes 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb fda7819674bd hyperledger/fabric-ca:x86_64-1.1.0 "sh -c 'fabric-ca-se…" 17 minutes ago Up 17 minutes 0.0.0.0:7054->7054/tcp ca.org1.example.com

  • composer network install --card PeerAdmin@hlfv1 --archiveFile basic-sample.bna (the bna file created before)
  • composer network start --networkName basic-sample --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card

Got error

✖ Starting business network definition. This may take a minute... Error: Error trying to start business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: cannot get package for chaincode (basic-sample:0.0.1)) Command failed

Retry:

use npmrcFile:

  • composer network install --card PeerAdmin@hlfv1 --archiveFile basic-sample.bna -o npmrcFile=npmConfig.txt
  • composer network start --networkName basic-sample --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card -o npmrcFile=npmConfig.txt

content of npmConfig.txt:

registry=https://registry.npm.taobao.org

Still Failed.

1

1 Answers

1
votes

I think this is the exact same problem as logged to an Issue on the Composer prpoject on GitHub.

https://github.com/hyperledger/composer/issues/3794

The short answer to this is that the network name on the start command is wrong. The name of the network is likely to be basic-sample-network.

The way to check the Name and the Version is to issue this command:

composer archive list -a basic-sample.bna