繁体   English   中英

在HyperLedger架构上安装Chaincode时出错

[英]Error installing chaincode on HyperLedger fabric

我正在虚拟机Ubuntu 14.04上使用本教程http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html ,并且运行脚本./byfn.sh -m up来启动网络。 。 当我运行此命令以安装chaincode时:

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

我收到以下错误:

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))

我怎样才能解决这个问题?

注意:我也运行docker exec -it cli bash

好的,虽然我不确定100%,因为没有提供足够的信息。 因此,基于注释中提供的日志快照以及基于的错误,您将获得:

错误:认可链码的错误:rpc错误:码=未知的desc =链码错误(状态:500,消息:安装链码代码mycc:1.0时出错(链码/var/hyperledger/production/chaincodes/mycc.1.0存在))

您试图安装链码的名称与byfn.sh脚本安装的byfn.sh码的名称重叠。 您可以在script.sh中看到:

尝试将install命令中的chaincode名称更改为其他名称,例如:

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

一种替代方法是禁用script.sh执行,但是您必须自己初始化和创建通道。 这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM