Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 713
Lakshmi Narayana Galla Avatar asked Aug 14 '26 20:08

Lakshmi Narayana Galla


2 Answers

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  
like image 71
R Thatcher Avatar answered Aug 17 '26 15:08

R Thatcher


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

like image 23
Ivan Avatar answered Aug 17 '26 17:08

Ivan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!