错误:认可链码的错误:rpc错误:码=未知desc =未能初始化链码(找不到链码mycc:0的句柄) [英] Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to init chaincode(handler not found for chaincode mycc:0)

查看:794
本文介绍了错误:认可链码的错误:rpc错误:码=未知desc =未能初始化链码(找不到链码mycc:0的句柄)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作本教程"针对开发人员" .但是在"第3终端-使用链码" 我一直在尝试运行此命令

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

$对等链代码实例化-n mycc -v 0 -c'{"Args":["a","10"]}'-C myc

$ peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10"]}' -C myc

它退出并显示此错误:

错误:认可链码时出错:rpc错误:代码=未知desc = 无法初始化chaincode(找不到链码mycc:0的处理程序)

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 ?

推荐答案

已解决.存在三个主要问题.

This is solved. There were three primary problems.

  1. 如Chris所述,证书已过期.将来,您可以通过解析轻松地检查证书的有效性.例如openssl x509 -in your_cert.pem -text

提供的工件没有正确配置.即,configtxgen实用程序消耗的configtx.yaml没有正确定义订购者地址.

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

最后,记录在案的用于启动链码的命令使用了错误的端口作为对等地址.应该是7052而不是7051.

Lastly, the documented command to start the chaincode used the wrong port for the peer address. Should be 7052 not 7051.

我很快会为此修复

这篇关于错误:认可链码的错误:rpc错误:码=未知desc =未能初始化链码(找不到链码mycc:0的句柄)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆