简体   繁体   中英

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

I had cloned the fabric folder and set up the development environment for the an orderer and a peer, they are both performing well. However, I had set them both on my PC's environment together, not separately in different docker containers. 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? Or do I have to change the route of mycc.1.0 used by this command?

It seems that the peer doesn't install mycc, run peer chaincode list --installed to find out

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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