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

proposals were not good #458

Closed redirus closed 5 years ago

redirus commented 5 years ago

node run-benchmark.js -c ../benchmark/simple/config.yaml -n ../network/fabric-v1.4/2org1peercouchdb/fabric-node.json

info: [scripts/run.js]: Benchmark for target Blockchain type fabric about to start info: [caliper-flow]: ####### Caliper Test ####### info: [caliper-flow]: Executing command: cd /users/yiyuan/caliper/packages/caliper-application/;docker-compose -f network/fabric-v1.4/2org1peercouchdb/docker-compose.yaml up -d;sleep 3s The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use docker stack deploy.

Creating network "2org1peercouchdb_default" with the default driver Creating orderer.example.com ... done Creating ca.org1.example.com ... done Creating ca.org2.example.com ... done Creating couchdb.org1.example.com ... done Creating couchdb.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 10s... 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: [install-chaincode.js]: Installing chaincode marbles... info: [install-chaincode.js]: Installed chaincode marbles successfully in all peers info: [install-chaincode.js]: Installing chaincode simple... info: [install-chaincode.js]: Installing chaincode simple... info: [install-chaincode.js]: Installed chaincode simple successfully in all peers info: [instantiate-chaincode.js]: Instantiating chaincodes... warn: [e2eUtils.js]: instantiate proposal was bad: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 8b51f8f9f1561f2ea7717d29ea287bfd94bdae4adea7123e0192a48b5cf6d221 warn: [e2eUtils.js]: instantiate proposal was bad: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 06e46a133634bbf52bb57aec8c38c5c09b92b89b129b1d6c504518c89cd05abb warn: [e2eUtils.js]: [{"message":"error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 8b51f8f9f1561f2ea7717d29ea287bfd94bdae4adea7123e0192a48b5cf6d221","stack":"Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 8b51f8f9f1561f2ea7717d29ea287bfd94bdae4adea7123e0192a48b5cf6d221\n at self._endorserClient.processProposal (/users/yiyuan/caliper/node_modules/fabric-client/lib/Peer.js:140:36)\n at Object.onReceiveStatus (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1207:9)\n at InterceptingListener._callNext (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:618:8)\n at callback (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:845:24)","status":500,"payload":{"type":"Buffer","data":[]},"peer":{"url":"grpc://localhost:7051","name":"localhost:7051","options":{"grpc.max_receive_message_length":-1,"grpc.max_send_message_length":-1,"grpc.keepalive_time_ms":120000,"grpc.http2.min_time_between_pings_ms":120000,"grpc.keepalive_timeout_ms":20000,"grpc.http2.max_pings_without_data":0,"grpc.keepalive_permit_without_calls":1,"grpc.ssl_target_name_override":"peer0.org1.example.com","grpc.default_authority":"peer0.org1.example.com"}},"isProposalResponse":true},{"message":"error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 06e46a133634bbf52bb57aec8c38c5c09b92b89b129b1d6c504518c89cd05abb","stack":"Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 06e46a133634bbf52bb57aec8c38c5c09b92b89b129b1d6c504518c89cd05abb\n at self._endorserClient.processProposal (/users/yiyuan/caliper/node_modules/fabric-client/lib/Peer.js:140:36)\n at Object.onReceiveStatus (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:1207:9)\n at InterceptingListener._callNext (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:568:42)\n at InterceptingListener.onReceiveStatus (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:618:8)\n at callback (/users/yiyuan/caliper/node_modules/fabric-client/node_modules/grpc/src/client_interceptors.js:845:24)","status":500,"payload":{"type":"Buffer","data":[]},"peer":{"url":"grpc://localhost:8051","name":"localhost:8051","options":{"grpc.max_receive_message_length":-1,"grpc.max_send_message_length":-1,"grpc.keepalive_time_ms":120000,"grpc.http2.min_time_between_pings_ms":120000,"grpc.keepalive_timeout_ms":20000,"grpc.http2.max_pings_without_data":0,"grpc.keepalive_permit_without_calls":1,"grpc.ssl_target_name_override":"peer0.org2.example.com","grpc.default_authority":"peer0.org2.example.com"}},"isProposalResponse":true}] error: [instantiate-chaincode.js]: Failed to instantiate chaincodes: Error: All proposals were not good at instantiate (/users/yiyuan/caliper/packages/caliper-fabric/lib/e2eUtils.js:397:15) at error: [fabric.js]: Fabric chaincode install failed: Error: All proposals were not good at instantiate (/users/yiyuan/caliper/packages/caliper-fabric/lib/e2eUtils.js:397:15) at error: [caliper-flow]: Error: Error: All proposals were not good at instantiate (/users/yiyuan/caliper/packages/caliper-fabric/lib/e2eUtils.js:397:15) at info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0 info: [caliper-flow]: Executing command: cd /users/yiyuan/caliper/packages/caliper-application/;docker-compose -f network/fabric-v1.4/2org1peercouchdb/docker-compose.yaml down;(test -z "$(docker ps -aq)") || docker rm $(docker ps -aq); Stopping peer0.org1.example.com ... done Stopping peer0.org2.example.com ... done Stopping ca.org2.example.com ... done Stopping couchdb.org1.example.com ... done Stopping couchdb.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 couchdb.org1.example.com ... done Removing couchdb.org2.example.com ... done Removing ca.org1.example.com ... done Removing orderer.example.com ... done Removing network 2org1peercouchdb_default info: [caliper-flow]:

#######################################

Test summary: 0 succeeded, 0 failed

#######################################

info: [scripts/run.js]: Benchmark run successfully

nodejs version is v8.16.0 npm version is 5.6.0 node-gyp version is v4.0.4

Does anyone know what happened? I can not run benchmark.

aklenik commented 5 years ago

@redirus I suspect that this might cause the problem:

The Docker Engine you're using is running in swarm mode.
Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

Otherwise, the error occurs in the Fabric peers, Caliper just displays the received error message:

Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container XYZ

I suggest not using the Docker Engine in swarm mode. Nevertheless, this is a Fabric deploy issue, so check the peer logs, and consult the Fabric Rocket.Chat channel or the mailing list.

Also, you might want to switch to the Fabric CCP adapter, since the current adapter you're using will be deprecated soon. You'll need to write your own network config file for v1.4.0 networks, but you can easily adapt it from an older fabric-ccp-*.yaml file.

redirus commented 5 years ago

yes. I left swarm mode and the issue happened again. Could I use fabric binary instead of docker? Will the issue disapper?

aklenik commented 5 years ago

The Fabric docker images should work just fine. Have you tried searching for the Fabric error above? Maybe it will give some hints about the origin of this error.