BlockBench单机部署问题解决

BlockBench单机部署问题

  • 下载Hyperdger Fabric 2.2.0的二进制文件与docker镜像
    镜像下载位置:
    镜像下载位置
    benchmark下载到/home路径下
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.2.0 1.4.8 -s
  • Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: connection error: desc = “transport: error while dialing: dial tcp 127.0.0.1:7050: connect: connection refused” Channel creation failed Create channel failed(配置hyperledger fabric 2.0中)
    解决方案:
#先关闭
./network.sh down
#再开启
./network.sh up
  • 当前创建的容器已存在
    Docker stop停止/remove删除所有容器
$ docker ps // 查看所有正在运行容器
$ docker stop containerId // containerId 是容器的ID

$ docker ps -a // 查看所有容器
$ docker ps -a -q // 查看所有容器ID

$ docker stop $(docker ps -a -q) //  stop停止所有容器
$ docker  rm $(docker ps -a -q) //   remove删除所有容器
  • 在fabric-sample中部署链码时报错,报错原因是下载依赖的连接被拒绝,如下所示:
    Error: failed to normalize chaincode path: ‘go list’ failed with: go: github.com/golang/protobuf@v1.3.2: Get “https://proxy.golang.org/github.com/golang/protobuf/@v/v1.3.2.mod”: dial tcp 172.217.160.81:443: connect: connection refused: exit status 1
    解决方案: 打开GO111MODULE工具,更换Go代理,命令行输入:
go env -w GOPROXY=https://goproxy.io,direct
go env -w GO111MODULE=on
  • erro: chaincode install failed with status: 500,错误信息如下:
// A code block
Installing chaincode on peer0.org1...
Using organization 1
++ peer lifecycle chaincode install basic.tar.gz
++ res=1
++ set +x
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "go: inconsistent vendoring in /chaincode/input/src:
    github.com/golang/protobuf@v1.3.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/hyperledger/fabric-chaincode-go@v0.0.0-20200424173110-d7076418f212: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
    github.com/hyperledger/fabric-contract-api-go@v1.1.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt 
    github.com/hyperledger/fabric-protos-go@v0.0.0-20200424173316-dd554ba3746e: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt 
    github.com/stretchr/testify@v1.5.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

run 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory"

!!!!!!!!!!!!!!! Chaincode installation on peer0.org1 has failed !!!!!!!!!!!!!!!!

ERROR !!! Deploying chaincode failed

更新go的版本,成功了。我之前用的是go 1.13,更新后用的是1.15,问题就解决了。具体更新方式可参考这篇博客go的版本更新,go的下载链接链接

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值