caliper
caliper copied to clipboard
Error: Error: Invalid endorsement for simple@v0 in mychannel from peer0.org1.example.com: 2 UNKNOWN: Stream removed
I am trying to set up a new environment but cant perform any bench due to unkown issue. The same settings works in other machine, even in a virtual machine (same distro Ubuntu 20.04, npm and node versions)
I am running caliper 0.2 because I never could ran any other version due to any random issue or bug since ever. (Even now)
Context
The error happens when I ran: npx caliper benchmark run --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/2org1peergoleveldb/fabric-go.yaml
Actual Behavior
Benchmark for target Blockchain type fabric about to start 2020.12.14-13:35:22.850 info [caliper] [benchmark-validator] No observer specified, will default to none
2020.12.14-13:35:22.852 info [caliper] [caliper-flow] ####### Caliper Test ####### 2020.12.14-13:35:22.858 info [caliper] [null-observer] Configured observer 2020.12.14-13:35:22.864 info [caliper] [caliper-utils] Executing command: cd /home/carlos/caliper-benchmarks;export FABRIC_VERSION=1.4.0;docker-compose -f networks/fabric/docker-compose/2org1peergoleveldb/docker-compose.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 2020.12.14-13:35:40.515 info [caliper] [adapters/fabric] Fabric SDK version: 1.4.1; TLS: none 2020.12.14-13:35:41.380 info [caliper] [adapters/fabric] Org1's registrar enrolled successfully 2020.12.14-13:35:41.798 info [caliper] [adapters/fabric] Org2's registrar enrolled successfully 2020.12.14-13:35:41.818 info [caliper] [adapters/fabric] Org1's admin's materials are successfully loaded 2020.12.14-13:35:41.827 info [caliper] [adapters/fabric] Org2's admin's materials are successfully loaded 2020.12.14-13:35:41.839 info [caliper] [adapters/fabric] client0.org1.example.com's materials are successfully loaded 2020.12.14-13:35:41.847 info [caliper] [adapters/fabric] client0.org2.example.com's materials are successfully loaded 2020.12.14-13:35:41.848 info [caliper] [adapters/fabric] Channel 'mychannel' definiton being retrieved from file 2020.12.14-13:35:41.932 info [caliper] [adapters/fabric] Channel 'mychannel' successfully created 2020.12.14-13:35:41.932 info [caliper] [adapters/fabric] Sleeping 5s... 2020.12.14-13:35:47.470 info [caliper] [adapters/fabric] Org1's peers successfully joined mychannel: peer0.org1.example.com 2020.12.14-13:35:47.971 info [caliper] [adapters/fabric] Org2's peers successfully joined mychannel: peer0.org2.example.com 2020.12.14-13:35:47.972 info [caliper] [adapters/fabric] Sleeping 5s... 2020.12.14-13:35:52.974 info [caliper] [adapters/fabric] Installing chaincodes for mychannel... 2020.12.14-13:35:53.022 info [caliper] [adapters/fabric] simple@v0 successfully installed on Org1's peers: peer0.org1.example.com
2020.12.14-13:35:53.033 info [caliper] [adapters/fabric] simple@v0 successfully installed on Org2's peers: peer0.org2.example.com
2020.12.14-13:35:53.034 info [caliper] [adapters/fabric] Instantiating simple@v0 in mychannel. This might take some time...
2020.12.14-13:35:55.284 error [caliper] [caliper-flow] Error: Error: Invalid endorsement for simple@v0 in mychannel from peer0.org1.example.com: 2 UNKNOWN: Stream removed at proposalResponses.forEach (/home/carlos/caliper-benchmarks/node_modules/@hyperledger/caliper-fabric/lib/fabric.js:1358:31) at Array.forEach (
Steps to Reproduce
1 npm install --only=prod @hyperledger/[email protected] 2 git checkout 0.2.0 3 npx caliper bind --caliper-bind-sut fabric --caliper-bind-sdk 1.4.1 4 npx caliper benchmark run --caliper-workspace . --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/fabric/fabric-v1.4.1/2org1peergoleveldb/fabric-go.yaml
Your Environment
- Caliper 0.2.0:
- Ubuntu 20.04, npm 6.14, nodejs 10.19
I had already tried dozens of tutorial, from english to russian and chinese and the same problem happens with any version (0.2, 0.3, 0.4). I think that something went wrong on a previous update, either here on github or with the docker image.
any solution here?
As of caliper 0.4.2 which is the current version that should be used, new versions of the fabric connectors for caliper were introduced along with a new network configuration format. The old fabric connectors and the old network configuration format are now deprecated. With the introduction of the new connectors, the ability to use caliper to create channels and deploy chaincode has also been deprecated even in the new connectors. although the new connectors have some support for this capability, and only in the 1.4 SUT version of the connector, it exists only to facilitate the caliper integration tests and is not recommended to be used as a mechanism for fabric operational capabilities such as chaincode deployment.
The above issue reports a problem trying to use caliper to deploy chaincode, so the first recommendation would be to create your fabric network and deploy the chaincode first without using caliper, then use 0.4.2 and the new network config format to benchmark that environment.
The 0.4.2 tutorial https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/tutorials-fabric-existing/ provides an introduction to this new format and the complete reference documentation can be found here https://hyperledger.github.io/caliper/v0.4.2/fabric-config/new/
Nice workaround, It worked! Thanks, @davidkel. Hopes that previous examples of the caliper bench repository runs easily by ctrl+c ctrl+v the required files.
--edit-- none of my previous benchs worked, not even the classic simple bench, which you guys removed from the caliper-benchmarks repo. Its going to take a lot of time to adapt and start the required networks. But the things are as they should be. Thanks once again.
By monitoring containers logs, I found out that you can simply adding the environment variable CHAINCODEADDRESS and CHAINCODELISTENADDRESS in docker-compose files in the samples and it's worked perfect!
@chsavvaidis which version of caliper did you used? 0.4,2 as suggested by @davidkel or an older version? Thanks.
@casm3 When the error messages seem random, it's best to check the Fabric-side logs. Caliper mostly reports the error messages returned by the Fabric nodes and those can be a bit cryptic sometimes (for various reasons). So I'd suggest monitoring the peers closely when you try to instantiate the chaincode. It's also strange that only one peer reports this error. So maybe it's a resource issue (one too many containers running on your machine)?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
how to solve it i nave a similar question
This will be either a configuration problem either in the fabric network or the connection profile. The other thing that could cause this is a chaincode crash, either way this won't be a problem with caliper but a problem with the network or chaincode. I would suggest testing your network and chaincode work correctly first before trying to perform benchmarks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.