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,050 points
795 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
answered Jul 13, 2018 by digger
• 27,630 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 5 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,020 points
804 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,050 points
231 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
• 27,630 points
358 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,050 points
79 views
0 votes
1 answer