无法实例化新添加的组织的对等方上的任何链码 [英] unable to Instantiate any chaincodes on peers of newly Added org

查看:93
本文介绍了无法实例化新添加的组织的对等方上的任何链码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将org3添加到现有网络中以进行余额转移示例,一旦添加,我在实例化此错误的同时尝试在org1和org3的对等节点上安装新的chaincode

I added org3 to existing network for balance transfer example once I added I am trying to install new chaincode on peers of org1 and org3 while instantiating I am getting this error

无法获取链码包(marbles02:v0)

cannot get package for chaincode (marbles02:v0)

 recoveryParam: 0 }
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: chaincode error (status: 500, message: cannot get package for chaincode (marbles02:v0))
    at /home/ubuntu/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:554:15
[2018-04-28 15:53:46.018] [INFO] instantiate-chaincode - instantiate proposal was good
[2018-04-28 15:53:46.018] [ERROR] instantiate-chaincode - instantiate proposal was bad
[2018-04-28 15:53:46.018] [DEBUG] instantiate-chaincode - Failed to send Proposal and receive all good ProposalResponse
[2018-04-28 15:53:46.019] [ERROR] instantiate-chaincode - Failed to instantiate. cause:Failed to send Proposal and receive all good ProposalResponse

我检查了对等点是否存在此路径上的代码

I checked the peers whether the code is existing or not its there at this path

root@9a8377b5940d:/var/hyperledger/production/chaincodes# ls
fabcar.v0  marbles02.v0

这是我运行的用于实例化版本且抄送名称不变的命令

this is the command I ran to instantiate version and cc name is unchanged

echo "POST instantiate chaincode on peer1 of Org3"
echo
curl -s -X POST \
  http://localhost:4000/channels/mychannel/chaincodes \
  -H "authorization: Bearer $ORG3_TOKEN" \
  -H "content-type: application/json" \
  -d "{
    \"chaincodeName\":\"marbles02\",
    \"chaincodeVersion\":\"v0\",
    \"chaincodeType\": \"$LANGUAGE\",
    \"args\":[]
}"

推荐答案

使用正确的路径安装链码(我建议将您的链码复制到余额转移文件夹中的artifacts/src/github路径中),然后从该路径中执行go build -o $chaincode_name路径并尝试实例化chaincode.当我遇到相同的错误时,它对我有用.

Install the chaincode with correct path (I recomend copying your chaincode to the path of artifacts/src/github inside the balance-transfer folder ) and do go build -o $chaincode_name from that path and try to instantiate the chaincode. It worked for me when I faced the same error.

这篇关于无法实例化新添加的组织的对等方上的任何链码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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