部署Hyperledger Fabric 1.0 出现 Attempting to Query PEER0 ...61 secs

这个错误,折磨了我久……
网上的方法都试过了,就是跑不通,宛如大便干燥……

结论先行

是由于Docker镜像的版本号不统一导致的,注意IMAGE ID

错误再现

在first-network目录下执行 byfn.sh -m up 命令

出现了 Query result on PEER0 is INVALID 这个错误,上网上查了一下,各种说法都有,什么二进制文件没安装、docker版本低、docker镜像版本的问题……

我执行docker images 查看镜像,发现版本号都是一样的,也按照网上其他也有说到“将版本号统一”
docker images

为什么还报错呢?一起看日志吧……

root@xxx:Go/src/github.com/hyperledger/fabric-samples/first-network$ byfn.sh -m up 
Starting with channel 'mychannel' and CLI timeout of '10'
Continue (y/n)? y
proceeding ...
/Go/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
org1.example.com
org2.example.com

/WorkSpace/Go/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
2019-12-02 17:52:43.427 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2019-12-02 17:52:43.448 CST [common/configtx/tool] doOutputBlock -> INFO 002 Generating genesis block
2019-12-02 17:52:43.449 CST [common/configtx/tool] doOutputBlock -> INFO 003 Writing genesis block

#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
2019-12-02 17:52:43.485 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2019-12-02 17:52:43.492 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2019-12-02 17:52:43.493 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 003 Writing new channel tx

#################################################################
#######    Generating anchor peer update for Org1MSP   ##########
#################################################################
2019-12-02 17:52:43.531 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2019-12-02 17:52:43.540 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2019-12-02 17:52:43.540 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

#################################################################
#######    Generating anchor peer update for Org2MSP   ##########
#################################################################
2019-12-02 17:52:43.571 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2019-12-02 17:52:43.575 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2019-12-02 17:52:43.575 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

Creating network "net_byfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.org1.example.com" with default driver
Creating volume "net_peer1.org1.example.com" with default driver
Creating volume "net_peer0.org2.example.com" with default driver
Creating volume "net_peer1.org2.example.com" with default driver
Pulling orderer.example.com (hyperledger/fabric-orderer:latest)...
latest: Pulling from hyperledger/fabric-orderer
b8f262c62ec6: Already exists
9c2dad781fe8: Already exists
7e48a048d895: Already exists
4b5f2a9ec0f7: Pull complete
a38d313ebb74: Pull complete
391a02b02202: Pull complete
Digest: sha256:f7715923e2ca67cee526c21638d86b21480e179419e9d6c20078caabb241b20e
Status: Downloaded newer image for hyperledger/fabric-orderer:latest
Pulling peer0.org1.example.com (hyperledger/fabric-peer:latest)...
latest: Pulling from hyperledger/fabric-peer
b8f262c62ec6: Already exists
9c2dad781fe8: Already exists
7e48a048d895: Already exists
4b5f2a9ec0f7: Already exists
9332c2443003: Pull complete
f8823b03421b: Pull complete
Digest: sha256:92c2bef91e80f54f6d73a89b796eab1b616f372e2258431f17d50dd0c2ce316b
Status: Downloaded newer image for hyperledger/fabric-peer:latest
Pulling cli (hyperledger/fabric-tools:latest)...
latest: Pulling from hyperledger/fabric-tools
7ddbc47eeb70: Pull complete
c1bbdc448b72: Pull complete
8c3b70e39044: Pull complete
45d437916d57: Pull complete
b5035666b1cd: Pull complete
94c898b5fdef: Pull complete
bee7bd3eb18f: Pull complete
9dc56c5637b5: Pull complete
31f2b9e8b256: Pull complete
89c4701a4f5f: Pull complete
18467825df3e: Pull complete
Digest: sha256:822418c5ad61473ecfa911dfe4b100264500c504c78def52730106a717be71cb
Status: Downloaded newer image for hyperledger/fabric-tools:latest
Creating peer1.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer1.org1.example.com ... done
Creating orderer.example.com    ... done
Creating cli                    ... done

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

Build your first network (BYFN) end-to-end test

Channel name : mychannel
Creating channel...
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_ENABLED=true
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_ID=cli
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:56:43.622 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:43.673 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longe
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值