Chaincode Container Not Getting Created #fabric #fabric-chaincode


soumya nayak <soumyarjnnayak@...>
 

Hi All,

Fabric - v1.4.3 (RAFT Orderer Set Up)

I have two Orgs network. OrgA and OrgB.
Installed the chaincode on both the anchor peers of OrgA and OrgB. Instantiated the chaincode from the anchor peer of OrgA. Successfully chaincode container is created in OrgA. Successful invocation of transaction is also happening.
But the chaincode container is not created for OrgB. List of instantiated chaincode is showing when the command is run from tools container of OrgB anchor peer. When i am invoking for any transaction from OrgB anchor Peer below is the issue :-

Error: endorsement failure during query. response: status:500 message:"failed to execute transaction e77af488e03537a465c30e56c6c13330f4c7f8aae8eae1a92656607c91c8df83: [channel legaldescriptionchannel] failed to get chaincode container info for ldbc:1.0: could not get chaincode code: chaincode fingerprint mismatch: data mismatch"

Regards,
Ranjan


soumya nayak <soumyarjnnayak@...>
 

Resolved the issue . The chaincode folder structure should be exactly same in both the peers to get the same hash fingerprintID which will create chaincode containers for both the org peers


Nicholas Leonardi
 

Hey, there's an easier and more trusted way for production.
First you run the command 

peer chaincode package -n ccName -p /opt/chaincodePath -v 1 chaincode.pak -l node

Then you get that chaincode.pak and run the command for the second org

peer chaincode install /etc/hyperledger/configtx/medcc.pak

This is how it should be in production because then all orgs will have exactly the same chaincode, version, name and fingerprint without any problems. 



Em terça-feira, 15 de outubro de 2019 08:04:45 BRT, soumya nayak <soumyarjnnayak@...> escreveu:


Resolved the issue . The chaincode folder structure should be exactly same in both the peers to get the same hash fingerprintID which will create chaincode containers for both the org peers


soumya nayak <soumyarjnnayak@...>
 

Thanks Nicholas for the reply. 

One thing i noticed is when i am installing the private chaincode . i checked in both the peer org machines the IDs of the installed chaincode is same but still the container was only created in the machine from where the instantiate command was run.

Regards,
Soumya