Response from attempted peer comms was an error: Chaincode Error

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))

Upvotes: 3

Views: 2447

Answers (2)

Ivan
Ivan

Reputation: 785

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

Upvotes: 1

R Thatcher
R Thatcher

Reputation: 5570

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  

Upvotes: 3

Related Questions