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 403 forks source link

chaincode error (status: 500, message: is not a valid endorsement system chaincode) #175

Closed litx closed 5 years ago

litx commented 5 years ago

node -v v8.11.4

npm -v 5.6.0

github.com/hyperledger/caliper run node ./benchmark/simple/main.js -c ./config.json -n ./fabric.json

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 (/opt/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15) at /opt/github.com/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 (/opt/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15) at /opt/github.com/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 (/opt/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15) at /opt/github.com/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 (/opt/github.com/hyperledger/caliper/node_modules/grpc/src/client.js:64:15) at /opt/github.com/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 (/opt/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:372:19) at at Client.newDefaultKeyValueStore.then.then.then.then.then (/opt/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:385:15) at

operator: fail
at: chaincodes.reduce.then.catch (/opt/github.com/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 (/opt/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:372:19)
      at <anonymous>
      at Client.newDefaultKeyValueStore.then.then.then.then.then (/opt/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:385:15)
      at <anonymous>
      at Test.assert [as _assert] (/opt/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:224:54)
      at Test.bound [as _assert] (/opt/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
      at Test.fail (/opt/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:317:10)
      at Test.bound [as fail] (/opt/github.com/hyperledger/caliper/node_modules/tape/lib/test.js:76:32)
      at chaincodes.reduce.then.catch (/opt/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:60:19)
      at <anonymous>

... fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed at chaincodes.reduce.then.catch (/opt/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:61:31) at [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 unexpected error, Error: Fabric: instantiate chaincodes failed at chaincodes.reduce.then.catch (/opt/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:61:31) at

aklenik commented 5 years ago

@litx This is a mismatch between the version of the SDK and the Fabric docker images. Make sure you install the v1.1.0 SDK images: npm install grpc@1.10.1 fabric-ca-client@1.1.0 fabric-client@1.1.0

You can check the installed version from the root Caliper dir with: npm ls fabric-client fabric-ca-client

litx commented 5 years ago

THS

feihujiang commented 5 years ago

This was resolved.