问题
I'm trying to make the tutorial "Chaincode for Developers" work. But at the section "Terminal 3 - Use the chaincode" I'm stuck trying to run this command
$ peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10"]}' -C myc
It exits with this error :
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to init chaincode(handler not found for chaincode mycc:0)
I've done some research but I don't know what to do. Could somebody please help me ?
回答1:
This is solved. There were three primary problems.
As Chris mentioned, the certs are expired. In the future you can easily check a certificate's validity by parsing it. For example
openssl x509 -in your_cert.pem -textThe provided artifacts were not configured properly. Namely, the configtx.yaml that the configtxgen utility consumed did not have the orderer address defined correctly.
Lastly, the documented command to start the chaincode used the wrong port for the peer address. Should be 7052 not 7051.
I will push a fix for this shortly
来源:https://stackoverflow.com/questions/47699785/error-error-endorsing-chaincode-rpc-error-code-unknown-desc-failed-to-ini