Closed conquerorAlex closed 5 years ago
@lenoAlex have you solved your problem? the error is "failed to instantiate chaincodes, failed to send instantiate proposal or receive valid response response null or status is not 200" please run the command again, if the error still appear, please check the version of grpc, make the verison is 1.10.1
@houqinghui the versions of libraries are:
npm list grpc caliper@0.1.0 /root/gopath/src/github.com/hyperledger/caliper ├─┬ fabric-client@1.1.0 │ └── grpc@1.10.1 deduped └── grpc@1.10.1 npm list fabric-client caliper@0.1.0 /root/gopath/src/github.com/hyperledger/caliper └── fabric-client@1.1.0 npm list fabric-ca-client caliper@0.1.0 /root/gopath/src/github.com/hyperledger/caliper └── fabric-ca-client@1.1.0
After running the same command again, the error still appear. And the strange thing is there is only two peers of docker created and running, as you can seen in logs.
info: [bench-flow.js]: ####### Caliper Test ###### info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.1/2org1peergoleveldb/docker-compose-tls.yaml up -d;sleep 3s Creating ca.org1.example.com ... done Creating orderer.example.com ... done Creating ca.org2.example.com ... done Creating peer0.org2.example.com ... done Creating peer0.org1.example.com ... done 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 mychannel... info: [join-channel.js]: Successfully joined peerOrg1's peers to mychannel info: [join-channel.js]: Successfully joined peerOrg2's peers to mychannel info: [join-channel.js]: Successfully joined mychannel info: [install-chaincode.js]: Installing chaincodes... info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/marbles-norichquery/node info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/marbles-norichquery/node info: [install-chaincode.js]: Installed chaincode marbles successfully in all peers info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/simple/node info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/simple/node info: [install-chaincode.js]: Installed chaincode simple successfully in all peers info: [instantiate-chaincode.js]: Instantiating chaincodes...
@lenoAlex Timeout also occurs if there was an error during chaincode instantiation. Please ensure that there are no leftover Docker containers and chaincode Docker images (the end script should take care of this).
Then, while you're waiting for the instantiation (but before the timeout), take a look at the container logs of one of the chaincode containers:
docker logs dev<something>
and its corresponding peer.
@lenoAlex i came accross the same question, follow the below steps that solve my problem.
docker ps
to check the running docker containers.docker rm all the docker names
to delete the running docker containers.@houqinghui @aklenik after updating to the latest version, the testing successful.
it is strange that the timeout problem occurs casually. Sometimes, the testing running successful, but others failed. the version of caliper used for testing is the latest. And others as follows: caliper@0.1.0 /root/gopath/src/github.com/hyperledger/caliper ├─┬ fabric-client@1.1.0 │ └── grpc@1.10.1 deduped └── grpc@1.10.1 caliper@0.1.0 /root/gopath/src/github.com/hyperledger/caliper └── fabric-ca-client@1.1.0
after replacing "src/contract/fabric/simple/node" to "contract/fabric/simple/go" of the chaincode, the problem solved. as for the reason why chaincode is node type causes casually testing failed is still not clear.
Issues #165 gives the answer. Just run npm install -g node-gyp node-pre-gyp
before you use command node benchmark/simple/main.js
to run the simple test.
If you still have doubt on it, feel free to open it again.
I just run the latest version of caliper using goleveldb, but it doesn't work. The command that I used is: npm test -- simple -c benchmark/simple/config.yaml -n network/fabric-v1.1/2org2peergoleveldb/fabric-go.json. Does it used wrong way?
The log as follows: root@host3:~/gopath/src/github.com/hyperledger/caliper# npm test -- simple -c benchmark/simple/config.yaml -n network/fabric -v1.1/2org2peergoleveldb/fabric-go.json
fixedRate controller implementation
init
pidRate controller implementation
init
BatchBuilderFactory implementation
getBatchBuilder
32 passing (20ms)
=============================== Coverage summary =============================== Statements : 5.67% ( 67/1181 ) Branches : 7.39% ( 26/352 ) Functions : 4.42% ( 10/226 ) Lines : 5.72% ( 67/1171 )
info: [bench-flow.js]: ####### Caliper Test ###### info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.1/2org1peergoleveldb/docker-compose-tls.yaml up -d;sleep 3s Creating network "2org1peergoleveldb_default" with the default driver Creating orderer.example.com ... done Creating ca.org2.example.com ... done Creating ca.org1.example.com ... done Creating peer0.org1.example.com ... done Creating peer0.org2.example.com ... done 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 mychannel... info: [join-channel.js]: Successfully joined peerOrg1's peers to mychannel info: [join-channel.js]: Successfully joined peerOrg2's peers to mychannel info: [join-channel.js]: Successfully joined mychannel info: [install-chaincode.js]: Installing chaincodes... info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/marbles-norichquery/node info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/marbles-norichquery/node info: [install-chaincode.js]: Installed chaincode marbles successfully in all peers info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/simple/node info: [packager/Node.js]: packaging Node from /root/gopath/src/github.com/hyperledger/caliper/src/contract/fabric/simple/node info: [install-chaincode.js]: Installed chaincode simple successfully in all peers info: [instantiate-chaincode.js]: Instantiating chaincodes...
error: [Peer.js]: sendProposal - timed out after:480000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/root/gopath/src/github.com/hyperledger/caliper/node_modules/fabric-client/lib/Peer.js:124:19) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) error: [instantiate-chaincode.js]: Failed to instantiate chaincodes: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. at Object.instantiateChaincode (/root/gopath/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:353:19) at
at process._tickCallback (internal/process/next_tick.js:189:7)
error: [fabric.js]: Fabric chaincode install failed: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200.
at Object.instantiateChaincode (/root/gopath/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:353:19)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
error: [bench-flow.js]: Error: Error: Failed to send instantiate Proposal or receive valid response. Response null or status is not 200.
at Object.instantiateChaincode (/root/gopath/src/github.com/hyperledger/caliper/src/fabric/e2eUtils.js:353:19)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
info: [bench-flow.js]: Executing command: docker-compose -f network/fabric-v1.1/2org1peergoleveldb/docker-compose-tls.yaml down;docker rm $(docker ps -aq);docker rmi $(docker images dev* -q)
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping ca.org2.example.com ... done
Stopping ca.org1.example.com ... done
Stopping orderer.example.com ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing ca.org2.example.com ... done
Removing ca.org1.example.com ... done