部署Hyperledger Fabric 1.0 出現(xiàn) Attempting to Query PEER0 ...61 secs

這個錯誤,折磨了我久……
網(wǎng)上的方法都試過了,就是跑不通离例,宛如大便干燥……

結(jié)論先行

是由于Docker鏡像的版本號不統(tǒng)一導(dǎo)致的,注意IMAGE ID

錯誤再現(xiàn)

在first-network目錄下執(zhí)行 byfn.sh -m up 命令

出現(xiàn)了 Query result on PEER0 is INVALID 這個錯誤纵东,上網(wǎng)上查了一下吊输,各種說法都有剩拢,什么二進(jìn)制文件沒安裝、docker版本低同辣、docker鏡像版本的問題……

我執(zhí)行docker images 查看鏡像,發(fā)現(xiàn)版本號都是一樣的哈肖,也按照網(wǎng)上其他也有說到“將版本號統(tǒng)一”

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 longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:43.687 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:56:43.737 UTC [cli.common] readBlock -> INFO 004 Received block: 0
===================== Channel "mychannel" is created successfully =====================

Having all peers join the 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:44.085 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:44.236 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:44.257 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:56:44.364 UTC [channelCmd] executeJoin -> INFO 004 Successfully submitted proposal to join channel
===================== PEER0 joined on the channel "mychannel" =====================

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=peer1.org1.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:56:47.466 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:47.506 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:47.518 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:56:47.584 UTC [channelCmd] executeJoin -> INFO 004 Successfully submitted proposal to join channel
===================== PEER1 joined on the channel "mychannel" =====================

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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:56:50.657 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:50.706 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:50.716 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:56:50.759 UTC [channelCmd] executeJoin -> INFO 004 Successfully submitted proposal to join channel
===================== PEER2 joined on the channel "mychannel" =====================

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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:56:53.849 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:53.906 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:53.934 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:56:53.993 UTC [channelCmd] executeJoin -> INFO 004 Successfully submitted proposal to join channel
===================== PEER3 joined on the channel "mychannel" =====================

Updating anchor peers for org1...
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:57.097 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:57.140 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:56:57.148 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:56:57.175 UTC [channelCmd] update -> INFO 004 Successfully submitted channel update
===================== Anchor peers for org "Org1MSP" on "mychannel" is updated successfully =====================

Updating anchor peers for org2...
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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:57:00.250 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:00.322 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:00.335 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2019-12-02 09:57:00.360 UTC [channelCmd] update -> INFO 004 Successfully submitted channel update
===================== Anchor peers for org "Org2MSP" on "mychannel" is updated successfully =====================

Installing chaincode on org1/peer0...
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:57:03.509 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:03.559 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:03.580 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-12-02 09:57:03.580 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2019-12-02 09:57:04.069 UTC [chaincodeCmd] install -> INFO 005 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on remote peer PEER0 =====================

Install chaincode on org2/peer2...
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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:57:04.152 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:04.197 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:04.221 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-12-02 09:57:04.221 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2019-12-02 09:57:04.588 UTC [chaincodeCmd] install -> INFO 005 Installed remotely response:<status:200 payload:"OK" >
===================== Chaincode is installed on remote peer PEER2 =====================

Instantiating chaincode on org2/peer2...
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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2019-12-02 09:57:04.678 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:04.717 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:57:04.750 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-12-02 09:57:04.750 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
===================== Chaincode Instantiation on PEER2 on channel 'mychannel' is successful =====================

Querying chaincode on org1/peer0...
===================== Querying on PEER0 on channel 'mychannel'... =====================
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
Attempting to Query PEER0 ...3 secs
Attempting to Query PEER0 ...37 secs
Attempting to Query PEER0 ...40 secs
Attempting to Query PEER0 ...43 secs
Attempting to Query PEER0 ...46 secs
Attempting to Query PEER0 ...49 secs
Attempting to Query PEER0 ...52 secs
Attempting to Query PEER0 ...56 secs
Attempting to Query PEER0 ...59 secs
Attempting to Query PEER0 ...62 secs

2019-12-02 09:59:01.545 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-12-02 09:59:01.615 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
100
!!!!!!!!!!!!!!! Query result on PEER0 is INVALID !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================

其實,仔細(xì)查看上面的日志會發(fā)現(xiàn):

...
Pulling orderer.example.com (hyperledger/fabric-orderer:latest)...
...
Pulling peer0.org1.example.com (hyperledger/fabric-peer:latest)...
...
Pulling cli (hyperledger/fabric-tools:latest)...
...

我們在看看docker鏡像磷醋,會發(fā)現(xiàn)……

$   docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
hyperledger/fabric-tools       latest              7552e1968c0b        2 weeks ago         1.49GB
hyperledger/fabric-ccenv       latest              ca4780293e4c        2 weeks ago         1.37GB
hyperledger/fabric-orderer     latest              dbc9f65443aa        2 weeks ago         120MB
hyperledger/fabric-peer        latest              9756aed98c6b        2 weeks ago         128MB
hyperledger/fabric-baseos      amd64-0.4.18        c256a6aad46f        3 weeks ago         80.8MB
hyperledger/fabric-tools       x86_64-1.0.0        0403fd1c72c7        2 years ago         1.32GB
hyperledger/fabric-couchdb     x86_64-1.0.0        2fbdbf3ab945        2 years ago         1.48GB
hyperledger/fabric-kafka       x86_64-1.0.0        dbd3f94de4b5        2 years ago         1.3GB
hyperledger/fabric-zookeeper   x86_64-1.0.0        e545dbf1c6af        2 years ago         1.31GB
hyperledger/fabric-orderer     x86_64-1.0.0        e317ca5638ba        2 years ago         179MB
hyperledger/fabric-peer        x86_64-1.0.0        6830dcd7b9b5        2 years ago         182MB
hyperledger/fabric-javaenv     x86_64-1.0.0        8948126f0935        2 years ago         1.42GB
hyperledger/fabric-ccenv       x86_64-1.0.0        7182c260a5ca        2 years ago         1.29GB
hyperledger/fabric-ca          x86_64-1.0.0        a15c59ecda5b        2 years ago         238MB

注意imageID! 注意imageID胡诗! 注意imageID邓线!

是的,的確和猜想一樣煌恢,下載了標(biāo)簽為latest的鏡像骇陈,這有的是用x86_64-1.0.0,有的用的是latest瑰抵,怎么可能統(tǒng)一嘛

解決方案

下面操作會用到 docker tag命令你雌,不會的看這里

  1. 先記錄都有那個鏡像是latest的
  2. 然后刪除latest鏡像docker rmi 7552e1968c0b ca4780293e4c dbc9f65443aa 9756aed98c6b(注意要填寫你自己的image id)
  3. 將現(xiàn)有的x86_64-1.0.0的鏡像,改tag為latest二汛。比如我的需要改fabric-tools婿崭、fabric-ccenv、fabric-peer肴颊、fabric-orderer
docker tag  hyperledger/fabric-tools:x86_64-1.0.0 hyperledger/fabric-tools:latest
docker tag  hyperledger/fabric-ccenv:x86_64-1.0.0 hyperledger/fabric-ccenv:latest
docker tag  hyperledger/fabric-peer:x86_64-1.0.0 hyperledger/fabric-peer:latest
docker tag  hyperledger/fabric-orderer:x86_64-1.0.0 hyperledger/fabric-orderer:latest

改過之后氓栈,查看一下鏡像docker images

REPOSITORY                            TAG                 IMAGE ID            CREATED             SIZE
hyperledger/fabric-baseos             amd64-0.4.18        c256a6aad46f        3 weeks ago         80.8MB
hyperledger/fabric-tools              latest              0403fd1c72c7        2 years ago         1.32GB
hyperledger/fabric-tools              x86_64-1.0.0        0403fd1c72c7        2 years ago         1.32GB
hyperledger/fabric-couchdb            x86_64-1.0.0        2fbdbf3ab945        2 years ago         1.48GB
hyperledger/fabric-kafka              x86_64-1.0.0        dbd3f94de4b5        2 years ago         1.3GB
hyperledger/fabric-zookeeper          x86_64-1.0.0        e545dbf1c6af        2 years ago         1.31GB
hyperledger/fabric-orderer            latest              e317ca5638ba        2 years ago         179MB
hyperledger/fabric-orderer            x86_64-1.0.0        e317ca5638ba        2 years ago         179MB
hyperledger/fabric-peer               latest              6830dcd7b9b5        2 years ago         182MB
hyperledger/fabric-peer               x86_64-1.0.0        6830dcd7b9b5        2 years ago         182MB
hyperledger/fabric-javaenv            x86_64-1.0.0        8948126f0935        2 years ago         1.42GB
hyperledger/fabric-ccenv              latest              7182c260a5ca        2 years ago         1.29GB
hyperledger/fabric-ccenv              x86_64-1.0.0        7182c260a5ca        2 years ago         1.29GB
hyperledger/fabric-ca                 x86_64-1.0.0        a15c59ecda5b        2 years ago         238MB
hyperledger/fabric-baseos             x86_64-0.3.1        4b0cab202084        2 years ago         157MB

注意imageID! 注意imageID婿着! 注意imageID授瘦!

現(xiàn)在再執(zhí)行一下byfn.sh -m up

...
...
...
===================== Chaincode is installed on remote peer PEER3 =====================

Querying chaincode on org2/peer3...
===================== Querying on PEER3 on channel 'mychannel'... =====================
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
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=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
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_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
Attempting to Query PEER3 ...3 secs

2019-12-02 10:23:37.604 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2019-12-02 10:23:37.605 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2019-12-02 10:23:37.605 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-12-02 10:23:37.605 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2019-12-02 10:23:37.605 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C08A9CC93EF0510...6D7963631A0A0A0571756572790A0161
2019-12-02 10:23:37.605 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: E132D9A02A23EAC394FA7048DBA18E34CAACE178C9683614447AAE95F489A291
Query Result: 90
2019-12-02 10:24:01.358 UTC [main] main -> INFO 007 Exiting.....
===================== Query on PEER3 on channel 'mychannel' is successful =====================

========= All GOOD, BYFN execution completed ===========


 _____   _   _   ____
| ____| | \ | | |  _ \
|  _|   |  \| | | | | |
| |___  | |\  | | |_| |
|_____| |_| \_| |____/

有木有上完廁所,渾身輕松的感覺竟宋?

總結(jié)

由于粗心奥务,沒有仔細(xì)查看日志。找到網(wǎng)上說的解決方案后袜硫,沒有仔細(xì)對比IMAGE ID

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末氯葬,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子婉陷,更是在濱河造成了極大的恐慌帚称,老刑警劉巖,帶你破解...
    沈念sama閱讀 212,383評論 6 493
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件秽澳,死亡現(xiàn)場離奇詭異闯睹,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)担神,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,522評論 3 385
  • 文/潘曉璐 我一進(jìn)店門楼吃,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事孩锡】嵯” “怎么了?”我有些...
    開封第一講書人閱讀 157,852評論 0 348
  • 文/不壞的土叔 我叫張陵躬窜,是天一觀的道長浇垦。 經(jīng)常有香客問我,道長荣挨,這世上最難降的妖魔是什么男韧? 我笑而不...
    開封第一講書人閱讀 56,621評論 1 284
  • 正文 為了忘掉前任,我火速辦了婚禮默垄,結(jié)果婚禮上此虑,老公的妹妹穿的比我還像新娘。我一直安慰自己口锭,他們只是感情好寡壮,可當(dāng)我...
    茶點故事閱讀 65,741評論 6 386
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著讹弯,像睡著了一般。 火紅的嫁衣襯著肌膚如雪这溅。 梳的紋絲不亂的頭發(fā)上组民,一...
    開封第一講書人閱讀 49,929評論 1 290
  • 那天,我揣著相機(jī)與錄音悲靴,去河邊找鬼臭胜。 笑死,一個胖子當(dāng)著我的面吹牛癞尚,可吹牛的內(nèi)容都是我干的耸三。 我是一名探鬼主播,決...
    沈念sama閱讀 39,076評論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼浇揩,長吁一口氣:“原來是場噩夢啊……” “哼仪壮!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起胳徽,我...
    開封第一講書人閱讀 37,803評論 0 268
  • 序言:老撾萬榮一對情侶失蹤积锅,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后养盗,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體缚陷,經(jīng)...
    沈念sama閱讀 44,265評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,582評論 2 327
  • 正文 我和宋清朗相戀三年往核,在試婚紗的時候發(fā)現(xiàn)自己被綠了箫爷。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,716評論 1 341
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖虎锚,靈堂內(nèi)的尸體忽然破棺而出硫痰,到底是詐尸還是另有隱情,我是刑警寧澤翁都,帶...
    沈念sama閱讀 34,395評論 4 333
  • 正文 年R本政府宣布碍论,位于F島的核電站,受9級特大地震影響柄慰,放射性物質(zhì)發(fā)生泄漏鳍悠。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 40,039評論 3 316
  • 文/蒙蒙 一坐搔、第九天 我趴在偏房一處隱蔽的房頂上張望藏研。 院中可真熱鬧,春花似錦概行、人聲如沸蠢挡。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,798評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽业踏。三九已至,卻和暖如春涧卵,著一層夾襖步出監(jiān)牢的瞬間勤家,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,027評論 1 266
  • 我被黑心中介騙來泰國打工柳恐, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留伐脖,地道東北人。 一個月前我還...
    沈念sama閱讀 46,488評論 2 361
  • 正文 我出身青樓乐设,卻偏偏與公主長得像讼庇,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子近尚,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 43,612評論 2 350

推薦閱讀更多精彩內(nèi)容