3

I'm trying to deploy a multiple organisations to Hyperledger fabric by following this tutorial

Everything works as expected until I try to start the network: Step no 17 command:

composer network start -c PeerAdmin@byfn-network-org1 -n trade-network -V 0.1.14 -o endorsementPolicyFile=/tmp/composer/endorsement-policy.json -A alice -C alice/admin-pub.pem -A bob -C bob/admin-pub.pem

after which I get the following error:

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 (trade-network:0.1.14))

James Z
  • 12,209
  • 10
  • 24
  • 44

2 Answers2

3

Assuming the composer network install command completed OK for both organisations, the composer network start has failed for the particular network name and version specified. It is likely that there is a mismatch with the parameters for version number and network name on the command line. Run the composer archive list command to see the exact name and version used in the .bna file.

You can also check what BNA has been installed on a peer by looking into the peer containers with commands similar to:

docker exec -it peer0.org1.example.com /bin/sh
# ls /var/hyperledger/production/chaincodes/

# exit

The ls command on the chaincodes file on the peer will show the BNAs available to be started e.g.:

tutorial-network.0.0.1  tutorial-network.0.0.3  
tutorial-network.0.0.2  tutorial-network.0.0.4  
R Thatcher
  • 5,550
  • 1
  • 7
  • 15
  • Thanks a lot ... it's working after changing the version but now it's failing at composer network ping -c alice@trede-network command Error : make sure the chaincode trade-network has been successfully instantiated and try again: could not find chaincode with name 'trade-network' – Lakshmi Narayana Galla Jul 12 '18 at 06:54
  • Does it work for Bob under step 19? (The name of the network used on the `composer card create` command must be exactly the same as the network name used on the composer network start command - perhaps that is the problem) – R Thatcher Jul 12 '18 at 09:20
  • No , it's failing at step 18 only , I used the same name for create and start – Lakshmi Narayana Galla Jul 13 '18 at 07:30
1

I ran into a similar error when upgrading the business network, but for my case I had not installed the new version onto the peer. It's likely that the you did not successful install the business network onto that peer. A detailed explanation is given here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Ivan
  • 759
  • 1
  • 10
  • 19