Hyperledger Fabric 1.0 公有云安装6--集群部署之坑
Posted wonder4
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hyperledger Fabric 1.0 公有云安装6--集群部署之坑相关的知识,希望对你有一定的参考价值。
使用了三台VPC,都是Ubuntu 16.04 LTS版
名称 | ip | 节点 | hostname | orgnazation |
s1 | 172.21.0.5 | orderer | orderer.example.com | orderer |
s2 s3 | 172.21.0.13 172.21.0.15 | sp0,cli sp1 | peer0.org1.example.com peer0.org2.example.com | org1 org2 |
如果要运行e2e_cli的例子,则必须准备5个节点,一个orderer四个peer并且分两个org。因为整个创建过程都在script.sh中写死,必须这些,如果要修改,自己要修改相应的脚本文件,脚本文件在docker cli中
如果出现启动peer时,BAD_REQUEST,可以关闭docker orderer,重新进入则就将创建好的channel删除了。
修改后的script.sh,这是peer0.org1.example.com中的,屏蔽peer0.org2.example.com的使用
s1跑orderer,s2跑peer0.org1和cli, s3跑peer0.org2
只能有一个cli,否则在其他peer join时会出现mychannel.block找不到的情况,因此就需要在一个cli中将所有peer都join到网络中。
如果在另外一台peer加入到网络时,报下面的错误,需要复制cli所在的crypto-config目录到peer所在的目录
"x509: ECDSA verification failure\\" while trying to verify candidate authority certificate \\"tlsca.example.com\\")"
如下错误,在调用peer0.org2.example.com的chaincode时报错,超时。docker images查看chaincode的镜像在,但就是执行超时,删除dev-peer0.org2.example.com-mycc-1.0的image,重新调用代码,则正常了。
Error: Error endorsing query: rpc error: code = Unknown desc = Error executing chaincode: Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:peer0.org2.example.com,tx:ab10012b339c8d5b18a3355c6e465db10de193749c9bb50f239dac6d770a85c0) - <nil>
Usage:
peer chaincode query [flags]
如下错误,是cli关闭的不完全,重新执行 docker-compose -f cli.yaml down,再执行就可以了
ubuntu@VM-0-13-ubuntu:/data/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli$ docker-compose -f cli.yaml up
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
WARNING: Found orphan containers (peer0.org1.example.com) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Starting cli ... error
ERROR: for cli Cannot start service cli: b'network aa5c77d29d1692dccdcb37de1bbb803a855a5bed1200820470fba265f98b6671 not found'
ERROR: for cli Cannot start service cli: b'network aa5c77d29d1692dccdcb37de1bbb803a855a5bed1200820470fba265f98b6671 not found'
ERROR: Encountered errors while bringing up the project.
如下错误,在docker-compose 加上 --remove-orphans
ubuntu@VM-0-13-ubuntu:/data/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli$ docker-compose -f cli.yaml up
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
WARNING: Found orphan containers (peer0.org1.example.com) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Starting cli ... error
ERROR: for cli Cannot start service cli: b'network 134bc768f40207c0a7020999c987f07aa560cfe89b5dc86147d713cd81dbfac0 not found'
以上是关于Hyperledger Fabric 1.0 公有云安装6--集群部署之坑的主要内容,如果未能解决你的问题,请参考以下文章
Hyperledger Fabric 1.0 公有云安装6--集群部署之坑
Hyperledger Fabric 1.0 公有云安装3--Go部分
Hyperledger Fabric 1.0 公有云安装2--docker-compose部分
Hyperledger Fabric 1.0 公有云安装7--集群部署记录