Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Blockchain by (12.7k points)

I'm working on this tutorial http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html on a virtual machine Ubuntu 14.04 and I run the script ./byfn.sh -m up to bring up the network. When I run this to install the chaincode

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 fix this

1 Answer

0 votes
by (29.5k points)

Try to change chaincode name in install command, to something different, e.g:

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

An alternative could be to disable the execution of the script.sh, however, you will have to initialize and create the channel yourself

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...