hyperledger / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper/
Apache License 2.0
650 stars 402 forks source link

Benchmark drm fails #391

Closed nimaafraz closed 5 years ago

nimaafraz commented 5 years ago

The following command fails: npm run bench -- -c benchmark/drm/config.yaml -n network/fabric-v1.1/dev/fabric-node.json

Context

Expected Behavior

Actual Behavior

(node:76178) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 226715) (node:76178) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined at Fabric.queryState (/Users/nima/caliper2/caliper/src/adapters/fabric/fabric.js:213:82) at Blockchain.queryState (/Users/nima/caliper2/caliper/src/comm/blockchain.js:162:33) at Object.module.exports.run (/Users/nima/caliper2/caliper/benchmark/drm/query.js:36:19) at runFixedNumber (/Users/nima/caliper2/caliper/src/comm/client/local-client.js:140:26) at

Possible Fix

Steps to Reproduce

1. 2. 3. 4.

Existing issues

Context

Your Environment

houqinghui commented 5 years ago

@nimaafraz Can you run npm run bench -- -c benchmark/drm/config.yaml -n network/fabric-v1.1/2org2peergoleveldb/fabric-node.json ?,

nimaafraz commented 5 years ago

@nimaafraz Can you run npm run bench -- -c benchmark/drm/config.yaml -n network/fabric-v1.1/2org2peergoleveldb/fabric-node.json ?,

Not really, this is the error I get: (node:11724) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 459883) (node:11724) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined at Fabric.queryState (/home/connect1/caliper/src/adapters/fabric/fabric.js:213:82) at Blockchain.queryState (/home/connect1/caliper/src/comm/blockchain.js:162:33) at Object.module.exports.run (/home/connect1/caliper/benchmark/drm/query.js:36:19) at runFixedNumber (/home/connect1/caliper/src/comm/client/local-client.js:140:26) at

aklenik commented 5 years ago

@nimaafraz The callback passes undefined as the id parameter. Did you successfully run the publish round of the benchmark? It is required before the query round.

nimaafraz commented 5 years ago

It seems that the Test round 1 does not go through.

caliper@0.1.0 bench /home/connect1/caliper node ./scripts/main.js "-c" "benchmark/drm/config.yaml" "-n" "network/fabric-v1.1/2org2peergoleveldb/fabric-node.json"

info: [bench-flow.js]: ####### Caliper Test ####### info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.1/2org2peergoleveldb/docker-compose.yaml up -d;sleep 3s 1.1.0: Pulling from hyperledger/fabric-ca 1.1.0: Pulling from hyperledger/fabric-ca 1.1.0: Pulling from hyperledger/fabric-orderer 1.1.0: Pulling from hyperledger/fabric-peer 1.1.0: Pulling from hyperledger/fabric-peer info: [create-channel.js]: Creating mychannel... info: [create-channel.js]: Created mychannel successfully info: [create-channel.js]: Sleeping 5s... info: [join-channel.js]: Joining channels... info: [join-channel.js]: Joining organization org1 to channel mychannel... info: [join-channel.js]: Successfully joined peerOrg1's peers to mychannel info: [join-channel.js]: Joining organization org2 to channel mychannel... info: [join-channel.js]: Successfully joined peerOrg2's peers to mychannel info: [join-channel.js]: Successfully joined mychannel info: [install-chaincode.js]: installing all chaincodes...... info: [install-chaincode.js]: Installing chaincode marbles... info: [packager/Node.js]: packaging Node from /home/connect1/caliper/src/contract/fabric/marbles-norichquery/node info: [install-chaincode.js]: Installing chaincode marbles... info: [packager/Node.js]: packaging Node from /home/connect1/caliper/src/contract/fabric/marbles-norichquery/node info: [install-chaincode.js]: Installed chaincode marbles successfully in all peers info: [install-chaincode.js]: Installing chaincode simple... info: [packager/Node.js]: packaging Node from /home/connect1/caliper/src/contract/fabric/simple/node info: [install-chaincode.js]: Installing chaincode simple... info: [packager/Node.js]: packaging Node from /home/connect1/caliper/src/contract/fabric/simple/node info: [install-chaincode.js]: Installed chaincode simple successfully in all peers info: [instantiate-chaincode.js]: Instantiating chaincodes... info: [e2eUtils.js]: The chaincode instantiate transaction was valid. info: [instantiate-chaincode.js]: Instantiated chaincode marbles successfully info: [e2eUtils.js]: The chaincode instantiate transaction was valid. info: [instantiate-chaincode.js]: Instantiated chaincode simple successfully info: [instantiate-chaincode.js]: Sleeping 5s... info: [bench-flow.js]: Started monitor successfully info: [bench-flow.js]: ####### Testing 'publish' ####### info: [bench-flow.js]: ------ Test round 1 ------ info: [bench-flow.js]: ####### Testing 'query' ####### info: [bench-flow.js]: ------ Test round 2 ------ info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0