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

Instantiate chaincode...... #118

Closed llhl001 closed 6 years ago

llhl001 commented 6 years ago

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

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

... fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed at chaincodes.reduce.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/fabric/instantiate-chaincode.js:70:31) at not ok 5 TypeError: Cannot read property 'getUpdates' of undefined

operator: error
expected: |-
  undefined
actual: |-
  [TypeError: Cannot read property 'getUpdates' of undefined]
at: process.onetime (/opt/gopath/src/github.com/hyperledger/caliper/node_modules/tape-promise/node_modules/onetime/index.js:22:12)
stack: |-
  TypeError: Cannot read property 'getUpdates' of undefined
      at update (/opt/gopath/src/github.com/hyperledger/caliper/src/gui/src/demo.js:145:26)
      at Object.demoStopWatch [as stopWatch] (/opt/gopath/src/github.com/hyperledger/caliper/src/gui/src/demo.js:185:5)
      at startPromise.then.then.then.then.then.then.catch (/opt/gopath/src/github.com/hyperledger/caliper/src/comm/bench-flow.js:347:18)
      at <anonymous>

...

1..5

tests 5

pass 3

fail 2

`

aklenik commented 6 years ago

Are you trying to run one of the samples or your own benchmark? Which Fabric SDK version are you using? Run npm ls fabric-client in the Caliper directory, what is the output?

llhl001 commented 6 years ago

npm ls fabric-client caliper@0.1.0 /opt/gopath/src/github.com/hyperledger/caliper └── fabric-client@1.2.0 extraneous

npm uninstall fabric-client@1.2.0 and npm install fabric-client@1.1.0

OK