How to solve Hyperledger Fabric error endorsing chaincode error

+1 vote

I am trying to practice the Hyperledger Fabric tutorial from the Hyperledger Fabric documentation on Ubuntu and I 
executed 

$ ./byfn.sh -m up

and then 

peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

I get the following error:

Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: Error installing chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1.0 exists))

How to solve this?

Jul 13, 2018 in Blockchain by slayer
• 29,370 points
4,658 views

2 answers to this question.

+1 vote

Try to install chaincode with a name that overlaps the name of the currently installed chaincode by byfn.sh

Try something similar to the following code: 

peer chaincode install -n myNewCC -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02


Hope this helps!

To know more, Enroll with Blockchain training online today.

Thank You!!

answered Jul 13, 2018 by digger
• 26,740 points
0 votes

You are getting this error because a chaincode name mycc already exists. Try removing that chaincode and then try running this command again. It will work. 

answered May 6, 2019 by Rashmi

Related Questions In Blockchain

+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,100 points
2,959 views
0 votes
1 answer

How to solve Runtime error when querying Hyperledger?

OCI is open container initiative.. The error ...READ MORE

answered Jul 9, 2018 in Blockchain by slayer
• 29,370 points
948 views
0 votes
1 answer

How to solve EACCES:permission denied error in Hyperledger Composer?

It seems like there is no required ...READ MORE

answered Jul 11, 2018 in Blockchain by digger
• 26,740 points
2,436 views
0 votes
1 answer

How to solve "error trying install composer runtime" in Hyperledger composer?

I think the docker-compose tool is not ...READ MORE

answered Jul 17, 2018 in Blockchain by slayer
• 29,370 points
898 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,455 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP