How can I resolve "chaincode fingerprint mismatch: data mismatch" in Managed Blockchain?

Last updated: 2020-11-12

How can I troubleshoot the error "chaincode fingerprint mismatch: data mismatch" in Amazon Managed Blockchain?

Short description

"Chaincode fingerprint mismatch: data mismatch" is a client-side error. This error happens when a peer node's chaincode fingerprint ID doesn't match the fingerprint on the other peer nodes. This usually happens when one or more peers in a channel is using a different chaincode version or path. To resolve the error, fix the path or reinstall the chaincode on all peer nodes.


1.    Run the following command on each peer node in the channel:

docker exec cli peer chaincode list --installed

2.    In the output, note the "Id" field. This is the chaincode fingerprint. Example:

Name: myjointcc, Version: v3, Path:, Id: af4a7734dac943a9b3183d339a848eeea8220d8647cefabccfbe89b3a4d23cbc

3.    Compare the IDs on all peer nodes in the channel. If a node has a different fingerprint, check the chaincode path to assure that the node is using the correct path. If the chaincode path is correct, continue to the next step.

4.    Install the chaincode again on all peer nodes in the channel. Be sure to use the same chaincode version for each peer node. Example:

docker exec cli peer chaincode install -n myjointcc -v v4 -p

5.    Instantiate the chaincode on each peer node in the channel. If your network has multiple members, be sure to instantiate the same chaincode version that's installed on the other peer nodes. In the following example command, replace Member1ID and Member2ID with your member IDs.

docker exec cli peer chaincode upgrade -o $ORDERER -C ourchanneltest -n myjointcc -v v4 -c '{"Args":["init","a","100","b","200"]}' --cafile /opt/home/managedblockchain-tls-chain.pem --tls -P "AND ('

Note: There is a known issue in Hyperledger Fabric 1.x that might still cause the "chaincode fingerprint mismatch" error, even after you complete these steps. For more information, see Same chaincode source receiving fingerprint mismatch error on the Hyperledger website. To resolve this issue, package the chaincode with Hyperledger Fabric Command Line Interface. Then, install the same package on all nodes, rather than using several clients to install the chaincode separately. For more information, see the Build chaincode example in the AWS Track-and-Trace Blockchain Workshop.

Did this article help?

Do you need billing or technical support?