fabirc1.2 e2e_cli遇到的问题:Ordering Service is not available

在使用fabric1.2的e2e_cli时遇到orderer服务不可用的问题,报错显示证书验证失败。排除了文件残留和系统重装的影响,发现可能是镜像版本导致的。通过更新fabric的Docker镜像至1.2.0版本,问题得到解决。可以使用特定脚本来下载fabric-example并拉取相关镜像。
摘要由CSDN通过智能技术生成

fabirc1.2 e2e_cli遇到的问题

昨天遇到了一个很奇怪的问题,新拉下来的Fabric代码,指定1.2版本后,启动e2e_cli demo,突然orderer不可用了!
并且在本机mac上做了测试,可用;最近的两台云主机都尚未运行过fabric,应该不是什么文件残留的问题;并且重装云服务器系统后,也还是改问题。

  • 具体报错如下,单独运行orderer容器,得到输出日志,看到是证书验证失败
Attempting to fetch system channel 'e2e-orderer-syschan' ...58 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...61 secs
2019-02-25 03:07:41.702 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-02-25 03:07:41.705 UTC [main] InitCmd -> ERRO 002 Cannot run peer because error when setting up MSP of type bccsp from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp: could not load a valid signer certificate from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts: stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts: no such file or directory
!!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================

查找资料,发现有人遇到过是版本的问题;突然想到,我的mac之前是有残留镜像的,并且fabric使用的都是latest标签的镜像,这就把镜像版本问题掩藏了,好像看起来都没问题,尝试更换镜像,结果ok!

  • 更换fabric docker镜像
    如下命令会下载fabric-example,并拉取1.2.0的相关镜像;
    如果因为墙的问题,curl获取不到该脚本,可通过配置代理,或者复制文末脚本(chmod +x test.sh && ./test.sh 1.2.0
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0
  • 再次启动e2e_cli
root@node2:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli# ./network_setup.sh up
setting to default channel 'mychannel'
mychannel

Using cryptogen -> /root/go/src/github.com/hyperledger/fabric/examples/e2e_cli/../../release/linux-amd64/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
org1.example.com
org2.example.com
...
Creating network "e2e_default" with the default driver
Creating peer1.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating zookeeper1             ... done
Creating zookeeper0             ... done
Creating peer1.org2.example.com ... done
Creating zookeeper2             ... done
Creating kafka2                 ... done
Creating kafka1                 ... done
Creating kafka0                 ... done
Creating kafka3                 ... done
Creating orderer.example.com    ... done
Creating cli                    ... done

 ____    _____      _      ____    _____           _____   ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|         | ____| |___ \  | ____|
\___ \    | |     / _ \   | |_) |   | |    _____  |  _|     __) | |  _|  
 ___) |   | |    / ___ \  |  _ <    | |   |_____| | |___   / __/  | |___ 
|____/    |_|   /_/   \_\ |_| \_\   |_|           |_____| |_____| |_____|

Channel name : mychannel
Check orderering service availability...
Attempting to fetch system channel 'e2e-orderer-syschan' ...3 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值