问题描述
我正在使用为作曲家提供的架构工具来部署架构网络,因为它部署了1个对等方,1个订购者,1个bedddb和&1个面料-ca.我可以在对等节点上安装链代码,但是实例化失败,并出现以下错误.我在fabric-peer上使用命令.
I'm using fabric tools provided for composer to deploy fabric network as it deploys 1 peer, 1 orderer, 1 couchdb, & 1 fabric-ca. I am able to install chain code on peer but instantiation fails with following error. I am using command on fabric-peer.
对等链代码实例化-o orderer.example.com:7050 -C composerchannel -n测试-l节点-v 1.0 -c'{"Args":["init","a","100","b","200"]}'
如果我查看订购者的日志,就会得到:
And if I check the logs of orderer I get:
推荐答案
检查托管peer0的节点(VM)上的日志:
Check logs on node (VM) which host peer0 with:
docker ps -a
您将找到带有退出代码的链式代码容器ID.
you will find chaincode container ID with exit code.
CONTAINER ID: **718e367bf1db**
IMAGE: dev-peer1-org1-**mycc-0.2**-9c1906
COMMAND: "/bin/sh -c 'cd /usr…"
其中 mycc-0.2 是您的链码名称和版本.
找到容器ID后,您可以使用以下方法检查错误日志:
where mycc-0.2 is you chaincode name and version.
Once you find the container ID - you can check the error log with:
docker logs <container_id>
我认为您的链码中有错误,并且应用程序无法启动.
I assume there is a bug in the your chaincode and the application can't start.
这篇关于Hyperledger Fabric链码实例化错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!