无法运行Fabric第一网络

时间:2017-09-14 08:34:02

标签: hyperledger-fabric hyperledger

当我通过运行给定命令

运行fabric-samples中的第一个网络时
./byfn.sh -m up

客户端似乎无法执行查询并生成以下控制台消息。

CORE_PEER_ADDRESS=peer0.org1.example.com:7051
Attempting to Query PEER0 ...3 secs
Attempting to Query PEER0 ...6 secs
Attempting to Query PEER0 ...9 secs
Attempting to Query PEER0 ...13 secs
Attempting to Query PEER0 ...16 secs
Attempting to Query PEER0 ...19 secs
Attempting to Query PEER0 ...22 secs
Attempting to Query PEER0 ...25 secs
Attempting to Query PEER0 ...28 secs
Attempting to Query PEER0 ...31 secs
Attempting to Query PEER0 ...34 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 ...55 secs
Attempting to Query PEER0 ...58 secs
Attempting to Query PEER0 ...61 secs

2017-09-14 08:28:34.964 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2017-09-14 08:28:34.964 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2017-09-14 08:28:34.964 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2017-09-14 08:28:34.964 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2017-09-14 08:28:34.965 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A95070A6708031A0C08B2FBE8CD0510...6D7963631A0A0A0571756572790A0161 
2017-09-14 08:28:34.965 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: D5683DD12A1733A407FA3684BA9681BDA0B2FE178BCF313A2D9A96F31E6EDAD6 
Error: Error endorsing query: rpc error: code = Unknown desc = could not find chaincode with name 'mycc' - make sure the chaincode mycc has been successfully instantiated and try again - <nil>
Usage:
  peer chaincode query [flags]

Flags:
  -C, --channelID string   The channel on which this command should be executed (default "testchainid")
  -c, --ctor string        Constructor message for the chaincode in JSON format (default "{}")
  -x, --hex                If true, output the query value byte array in hexadecimal. Incompatible with --raw
  -n, --name string        Name of the chaincode
  -r, --raw                If true, output the query value as raw bytes, otherwise format as a printable string
  -t, --tid string         Name of a custom ID generation algorithm (hashing and decoding) e.g. sha256base64

Global Flags:
      --cafile string              Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
      --logging-level string       Default logging level and overrides, see core.yaml for full syntax
  -o, --orderer string             Ordering service endpoint
      --test.coverprofile string   Done (default "coverage.cov")
      --tls                        Use TLS when communicating with the orderer endpoint
  -v, --version                    Display current version of fabric peer server

!!!!!!!!!!!!!!! Query result on PEER0 is INVALID !!!!!!!!!!!!!!!!
================== ERROR !!! FAILED to execute End-2-End Scenario ==============

我之前可以成功启动它。但现在我根本无法工作!我尝试将网络关闭并重新启动。但它仍然无效!

有人帮我吗?

1 个答案:

答案 0 :(得分:1)

我建议清理一下并获取最新的图片,二进制文件,并按照http://hyperledger-fabric.readthedocs.io/en/latest/samples.html更新fabric-samples repo的克隆。

如果您已经这样做了,您可能需要确保自己运行 再次./byfn.sh -m generate