測驗Fabric1.4.1性能執行以下指令
npx caliper launch master --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/2org1peergoleveldb/fabric-go.yaml
報錯內容如下:
Error while performing "install" step: Error: Invalid endorsement for marbles@v0 in mychannel from peer0.org1.example.com: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1
"/chaincode/input/src/fabric/samples/marbles/go/marbles.go:110:2: cannot find package
"github.com/hyperledger/fabric/core/chaincode/shim" in any of:
/usr/local/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH)
/go/src/github.com/hyperledger/fabric/core/chaincode/shim
/chaincode/input/src/fabric/samples/marbles/go/marbles.go:111:2: cannot find package "github.com/hyperledger/fabric/protos/peer" in any of:
/usr/local/go/src/github.com/hyperledger/fabric/protos/peer (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/fabric/protos/peer (from $GOPATH)
/go/src/github.com/hyperledger/fabric/protos/peer"
如圖所示:

這是由于Fabric發布鏡像的方式發生更改而導致的錯誤,這導致舊版Fabric(1.4.x)無法正確生成鏈碼,因為它們無法在docker hub中找到正確的鏡像,
查看docker鏡像
docker images

我測驗的是Fabric1.4.1的性能,所以執行,其他版本的小伙伴可以更改1.4.1這個引數
docker image tag hyperledger/fabric-ccenv:1.4.1 hyperledger/fabric-ccenv:latest
再次查看docker鏡像,已成功標記為latest
docker images

再次執行測驗網路性能命令
npx caliper launch master --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/2org1peergoleveldb/fabric-go.yaml
以上問題已經解決

歡迎小伙伴討論,如有錯誤請在評論區評論或發私聊訊息,謝謝你,
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/148177.html
標籤:AI
上一篇:【ipv6路由請教】求救:ipv6定制路由請教如何設定
下一篇:為何光纖的速度比網線速度快啊?
