运行Fabric示例e2e_cli network_setup.sh时出错

时间:2018-08-01 10:22:29

标签: hyperledger-fabric hyperledger

我尝试运行fabric-1.2.0示例/ e2e_cli,

出现如下错误:

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

Channel name : mychannel
Check orderering service availability...
Attempting to fetch system channel 'e2e-orderer-syschan' ...3 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...7 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...11 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...14 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...17 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...20 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...24 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...27 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...30 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...33 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...36 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...39 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...42 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...46 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...49 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...52 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...55 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...58 secs
Attempting to fetch system channel 'e2e-orderer-syschan' ...61 secs
2018-08-01 09:42:03.782 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2018-08-01 09:42:03.783 UTC [viperutil] unmarshalJSON -> DEBU 002 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value

unmarshalJSON-> DEBU 002解组JSON:无法解组值:无效字符'S'寻找值的开头

下面有很多类似的错误 ......

2018-08-01 09:42:03.791 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2018-08-01 09:42:03.791 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[Default:SW SW:map[FileKeyStore:map[KeyStore:] Hash:SHA2 Security:256] PKCS11:map[Library:<nil> Label:<nil> Pin:<nil> Hash:<nil> Security:<nil> FileKeyStore:map[KeyStore:<nil>]]]]
2018-08-01 09:42:03.791 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore]...done
2018-08-01 09:42:03.791 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2018-08-01 09:42:03.791 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/intermediatecerts
2018-08-01 09:42:03.792 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/intermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/intermediatecerts: no such file or directory]
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlsintermediatecerts
2018-08-01 09:42:03.792 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlsintermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlsintermediatecerts: no such file or directory]
2018-08-01 09:42:03.792 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/crls
2018-08-01 09:42:03.792 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/crls]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/crls: no such file or directory]
2018-08-01 09:42:03.792 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/config.yaml: no such file or directory]
2018-08-01 09:42:03.793 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2018-08-01 09:42:03.793 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2018-08-01 09:42:03.793 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2018-08-01 09:42:03.793 UTC [msp] Setup -> DEBU 02f Setting up MSP instance OrdererMSP
2018-08-01 09:42:03.793 UTC [msp/identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICLzCCAdagAwIBAgIRAIXgXz0/BvDFLJSNteLnAnowCgYIKoZIzj0EAwIwaTEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt
cGxlLmNvbTAeFw0xODA4MDEwOTM1NTJaFw0yODA3MjkwOTM1NTJaMGkxCzAJBgNV
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j
b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATWwxXc7j10ZZfjY5No3CFjO2H+
19cU9zq9bE/2X9psPTvDzk3Nl0J70OuPpcRvd0ak1OJKZwNDNvbs0t4VX6Tuo18w
XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD
AQH/MCkGA1UdDgQiBCDij+X04IQQIRlQG3TNTgurGUML19XuTFCPul4lNvFGCDAK
BggqhkjOPQQDAgNHADBEAiBf2vZ3B9pJjm+P9kAb60w9l2bZ+fjyanYVG7KsAAgq
QwIgJaakCmH/qDV41oX47u+Xpwci48V5BHV9iNqju28hNOA=

并且有一些“ ----- BEGIN CERTIFICATE -----”和“ ----- END CERTIFICATE -----” .......

-----END CERTIFICATE-----
2018-08-01 09:42:03.822 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-07-29 09:35:52 +0000 UTC
2018-08-01 09:42:03.822 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity
2018-08-01 09:42:03.823 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-08-01 09:42:03.824 UTC [grpc] Printf -> DEBU 038 parsed scheme: ""
2018-08-01 09:42:03.824 UTC [grpc] Printf -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-08-01 09:42:03.824 UTC [grpc] Printf -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0  <nil>}]
2018-08-01 09:42:03.824 UTC [grpc] Printf -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-08-01 09:42:03.825 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4201e0de0, CONNECTING
2018-08-01 09:42:03.829 UTC [grpc] Printf -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4201e0de0, READY
2018-08-01 09:42:03.829 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized
2018-08-01 09:42:03.829 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity
2018-08-01 09:42:03.829 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity
2018-08-01 09:42:03.829 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AD6060A1F08051A0608EB8086DB0522...71514367BF7D12080A021A0012021A00 
2018-08-01 09:42:03.829 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: BAB296247EB0DFE2ED5F02F263AA72B6F66E783E04E5535096C22E0EA473E87E 
2018-08-01 09:42:03.830 UTC [cli/common] readBlock -> INFO 043 Got status: &{SERVICE_UNAVAILABLE}
Error: can't read the block: &{SERVICE_UNAVAILABLE}
!!!!!!!!!!!!!!! Ordering Service is not available, Please try again ... !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==================

我已经按照http://hyperledger-fabric.readthedocs.io/en/latest/install.html的指示进行了所有操作。

,我无法从官方网站获得任何解决方案。 因此,任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:0)

我今天遇到了同样的问题。您正在使用master分支吗?我认为master分支代码中可能存在一些错误。所以我签出了release-1.2分支,然后再次尝试,然后解决了。您可以尝试一下。

答案 1 :(得分:0)

我遇到了同样的问题。请通过以下解决方案解决问题。

首先,您应该编辑文件./base/peer-base.yaml

并编辑此行 - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_default 进入 - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default

然后您应该运行命令./network_setup.sh up。您将遇到类似cannot find the network的错误。然后您通过./network_setup.sh down关闭结构网络。

再次编辑文件./base/peer-base.yaml的行。

- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_cli_default- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=e2e_default

通过./network_setup.sh up重新打开网络。现在一切都很好。