Hyperledger caliperのパフォーマンステストで発生した問題

10796 ワード

参考以下のチュートリアル:Hyperledger Fabric-Caliper:実行環境の構築
コマンドを入力すると、次の手順に従います.
node benchmark/simple/main.js
# create mychannel......
ok 1 created mychannel successfully
# Sleep 5s......
# Join channel......
# join mychannel
ok 2 Successfully joined mychannel
# install all chaincodes......
ok 3 Installed chaincode simple successfully in all peers
# Instantiate chaincode......
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message:  is not a valid endorsement system chaincode)
    at new createStatusError (/root/Hyperledger-caliper/node_modules/grpc/src/client.js:64:15)
    at /root/Hyperledger-caliper/node_modules/grpc/src/client.js:583:15
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message:  is not a valid endorsement system chaincode)
    at new createStatusError (/root/Hyperledger-caliper/node_modules/grpc/src/client.js:64:15)
    at /root/Hyperledger-caliper/node_modules/grpc/src/client.js:583:15
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message:  is not a valid endorsement system chaincode)
    at new createStatusError (/root/Hyperledger-caliper/node_modules/grpc/src/client.js:64:15)
    at /root/Hyperledger-caliper/node_modules/grpc/src/client.js:583:15
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message:  is not a valid endorsement system chaincode)
    at new createStatusError (/root/Hyperledger-caliper/node_modules/grpc/src/client.js:64:15)
    at /root/Hyperledger-caliper/node_modules/grpc/src/client.js:583:15
not ok 4 Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... at Client.newDefaultKeyValueStore.then.then.then.then (/root/Hyperledger-caliper/src/fabric/e2eUtils.js:372:19) at <anonymous> at Client.newDefaultKeyValueStore.then.then.then.then.then (/root/Hyperledger-caliper/src/fabric/e2eUtils.js:385:15) at <anonymous>
  ---
    operator: fail
    at: chaincodes.reduce.then.catch (/root/Hyperledger-caliper/src/fabric/instantiate-chaincode.js:60:19)
    stack: |-
      Error: Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting...
          at Client.newDefaultKeyValueStore.then.then.then.then (/root/Hyperledger-caliper/src/fabric/e2eUtils.js:372:19)
          at <anonymous>
          at Client.newDefaultKeyValueStore.then.then.then.then.then (/root/Hyperledger-caliper/src/fabric/e2eUtils.js:385:15)
          at <anonymous>
          at Test.assert [as _assert] (/root/Hyperledger-caliper/node_modules/tape/lib/test.js:228:54)
          at Test.bound [as _assert] (/root/Hyperledger-caliper/node_modules/tape/lib/test.js:80:32)
          at Test.fail (/root/Hyperledger-caliper/node_modules/tape/lib/test.js:322:10)
          at Test.bound [as fail] (/root/Hyperledger-caliper/node_modules/tape/lib/test.js:80:32)
          at chaincodes.reduce.then.catch (/root/Hyperledger-caliper/src/fabric/instantiate-chaincode.js:60:19)
          at <anonymous>
  ...
fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed
    at chaincodes.reduce.then.catch (/root/Hyperledger-caliper/src/fabric/instantiate-chaincode.js:61:31)
    at <anonymous>
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: instantiate chaincodes failed
    at chaincodes.reduce.then.catch (/root/Hyperledger-caliper/src/fabric/instantiate-chaincode.js:61:31)
    at <anonymous>
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
Stopping peer1.org2.example.com ... done
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping peer1.org1.example.com ... done
Stopping ca_peerOrg1            ... done
Stopping ca_peerOrg2            ... done
Stopping simplenetwork_ca_1     ... done
Stopping orderer.example.com    ... done
Removing peer1.org2.example.com ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing peer1.org1.example.com ... done
Removing ca_peerOrg1            ... done
Removing ca_peerOrg2            ... done
Removing simplenetwork_ca_1     ... done
Removing simplenetwork_peer_1   ... done
Removing orderer.example.com    ... done
Removing network simplenetwork_default
"docker rm" requires at least 1 argument.
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
"docker rmi" requires at least 1 argument.
See 'docker rmi --help'.

Usage:  docker rmi [OPTIONS] IMAGE [IMAGE...]

Remove one or more images

1..4
# tests 4
# pass  3
# fail  1