首页 > 解决方案 > Kubernetes 中的 Hyperledger Fabric:无法实例化链码

问题描述

大家好,我正在 kubernetes 中设置结构默认第一网络。但是当我实例化链码时,它给了我错误。请检查以下是我的同行日志。

  2019-07-22 07:25:02.134 UTC [endorser] SimulateProposal -> ERRO 066 [mychannel][c4b4e2ae] failed to invoke chaincode name:"lscc" , error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63
runtime.goexit
    /opt/go/src/runtime/asm_amd64.s:1333
chaincode registration failed

在 Cli 上出现此错误:-

 2019-07-22 07:24:58.263 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-07-22 07:24:58.264 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0

标签: kuberneteshyperledger-fabrichyperledgerhyperledger-chaincodechaincode

解决方案


一旦检查您的所有 docker 容器是否已启动并正在运行,并且如果您只是运行示例网络而不对智能合约和 docker 文件进行任何更改,那么您可以简单地停止您的网络并重新启动网络(它在我的情况下有效)。


推荐阅读