错误:在调用过程中背书失败。响应:状态:500消息:"在模拟中出错。

问题描述 投票:0回答:1

我在使用hyperledger fabric 2. 0. 我有两个orgs.ORGA和ORGB。我有两个组织,ORGA和ORGB。我使用fabric-samples仓库中的 "test-network "作为我的网络。我已经编辑了javascript版本的fabcar链码,修改了init函数和fabcar.js链码中的其他函数的变量名。我已经将我编辑的链码安装在两个orgs的对等体上。我也成功地在两个org上批准了chaincode。成功地将链码定义提交到通道中。但是当我试图使用命令和函数initLedger调用链码时,我得到了错误。

command: peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls true --cafile ${PWD}organizationsordererOrganizationsexample. comorderersorderer.example.commsptlscacertstlsca.example.com-cert.pem -C mychannel -n deed --peerAddresses localhost:7051 --tlsRootCertFiles ${PWD}organizationspeerOrganizationsorg1. example.compeerspeer0.org1.example.comtlsca.crt --peerAddresses localhost:9051 --tlsRootCertFiles ${PWD}organizationspeerOrganizationsorg2.example.compeerspeer0.org2.example.comtlsca.crt --isInit -c '{"function": "initLedger", "Args":[]}' 。

我得到一个错误,如下图所示。

Error: endorsement failure during invoke. response: status:500 message: "error in simulation: failed to execute transaction 5b14718ab2408cd29dafc9daf33e193534c7a1262afebd0ca5eae3b0116aeca0: 无法启动链码deed_1:48b197c4e734f589019d61ba1615ad9fc2b0007f478ab92a8b34714bc3c404e0:链码注册失败:容器退出1"

帮助我。谢谢,萨蒂什

hyperledger-fabric hyperledger hyperledger-chaincode
1个回答
1
投票

这个错误是告诉你托管链码的容器在链码进程终止后退出了,退出代码为1。 如果你已经配置了对等体来流转链码容器日志(vm.docker.attachStdout=true CORE_VM_DOCKER_ATTACHSTDOUT=true),你可以查看同行的日志,查看链码产生的任何错误。

© www.soinside.com 2019 - 2024. All rights reserved.