简体   繁体   English

设置 Hyperledger Fabric 开发环境时出现路由错误

[英]route error when setting up Hyperledger Fabric dev environment

I'm setting up the development environment of Hyperledger Fabric following the tutorial: Running chaincode in development mode我正在按照教程设置 Hyperledger Fabric 的开发环境: 在开发模式下运行链代码

I had cloned the fabric folder and set up the development environment for the an orderer and a peer, they are both performing well.我已经克隆了 fabric 文件夹并为 orderer 和 peer 设置了开发环境,它们都表现良好。 However, I had set them both on my PC's environment together, not separately in different docker containers.但是,我将它们一起设置在我的 PC 环境中,而不是单独设置在不同的 docker 容器中。 Following the instructions, I had created the channel and started the sample chaincode as well.按照说明,我创建了通道并启动了示例链代码。

However, when I run this command in the "Next Steps" part of the tutorial:但是,当我在本教程的“后续步骤”部分运行此命令时:

CORE_PEER_ADDRESS=127.0.0.1:7051 peer chaincode invoke -o 127.0.0.1:7050 -C ch -n mycc -c '{"Args":["init","a","100","b","200"]}' --isInit

an error occurred:发生错误:

Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction bc2357ccb38b3abcca2499210a9f380c4263d186fe8e7bd974c7875ce4a7f8c4: could not launch chaincode mycc:1.0: error building chaincode: error building image: failed to get chaincode package for external build: could not get legacy chaincode package 'mycc:1.0': open /var/hyperledger/production/chaincodes/mycc.1.0: no such file or directory" 

I'm a new beginner and get really confused about this.我是一个新手,对此感到非常困惑。 Do I need to set the peer node and orderer node separately in two docker containers?我需要在两个 docker 容器中分别设置 peer 节点和 orderer 节点吗? Or do I have to change the route of mycc.1.0 used by this command?还是我必须更改此命令使用的 mycc.1.0 的路由?

It seems that the peer doesn't install mycc, run peer chaincode list --installed to find out好像peer没有安装mycc,运行peer chaincode list --installed查看

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

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