New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instantiate chaincodes Error #137
Comments
Based on the default settings you use for the benchmark, you are running 7 nodes/containers (1 orderer, 2 CAs, 4 peers) on the same physical machine. If that machine is not "strong" enough (the containers interfere with each other due to the common physical resource), 2 minutes won't be enough to instantiate a chaincode (which involves building a docker image, and running the chaincode Try increasing the timeout value. Unfortunately, it is currently hard-coded, so you have to modify this line. |
@aklenik thanks a lot, your kind help came to my rescue. |
@aklenik I tried to add up to six minutes, but time out came. Is there any other reason for this problem? |
@PoormaJin @cao0507 The timeout error can also mean that an error occurred in your chaincode |
Thank you for your reply, but I have solved the problem. My problem maybe result from the pre-requisites, when i install the node-gyp correctly the benchmark run successfully. |
How did you install node-gyp? I am facing the same issue during instantiation of chaincode. |
@revobd |
Thanks. I did that but still had the same issue. It finally worked after doubling the timeout. |
for newer version (caliper 0.3.2) how do i change the timeout? |
@nurhazbiy Here are the config keys you can set for the Fabric adapter: https://hyperledger.github.io/caliper/v0.3.2/runtime-config/#fabric-adapter-settings |
root@ubuntu:/smbshare/caliper# node benchmark/simple/main.js
TAP version 13
#######Caliper Test######
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d
Creating network "simplenetwork_default" with the default driver
Creating orderer.example.com
Creating ca_peerOrg1
Creating simplenetwork_peer_1
Creating ca_peerOrg2
Creating simplenetwork_ca_1
Creating peer1.org2.example.com
Creating peer1.org1.example.com
Creating peer0.org1.example.com
Creating peer0.org2.example.com
create mychannel......
ok 1 created mychannel successfully
Sleep 5s......
Join channel......
join mychannel
ok 2 Successfully joined mychannel
install all chaincodes......
info: [packager/Golang.js]: packaging GOLANG from contract/fabric/simple/go
info: [packager/Golang.js]: packaging GOLANG from contract/fabric/simple/go
ok 3 Installed chaincode simple successfully in all peers
Instantiate chaincode......
error: [Peer.js]: sendProposal - timed out after:120000
error: [Peer.js]: sendProposal - timed out after:120000
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/smbshare/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: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/smbshare/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: [Peer.js]: sendProposal - timed out after:120000
error: [Peer.js]: sendProposal - timed out after:120000
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/smbshare/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: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT
at Timeout._onTimeout (/smbshare/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)
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 (/smbshare/caliper/src/fabric/e2eUtils.js:375:19) at at process._tickCallback (internal/process/next_tick.js:188:7) at Client.newDefaultKeyValueStore.then.then.then.then.then (/smbshare/caliper/src/fabric/e2eUtils.js:388:15) at at process._tickCallback (internal/process/next_tick.js:188:7)
...$(docker ps -aq);docker rmi $ (docker images dev* -q)
fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed
at chaincodes.reduce.then.catch (/smbshare/caliper/src/fabric/instantiate-chaincode.js:61:31)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: instantiate chaincodes failed
at chaincodes.reduce.then.catch (/smbshare/caliper/src/fabric/instantiate-chaincode.js:61:31)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm
The text was updated successfully, but these errors were encountered: