Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to init chaincode(handler not found for chaincode mycc:0)

倾然丶 夕夏残阳落幕 提交于 2019-12-08 04:55:46

问题


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.

  1. 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 -text

  2. The provided artifacts were not configured properly. Namely, the configtx.yaml that the configtxgen utility consumed did not have the orderer address defined correctly.

  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!