Chaincode Query Transcation is not executing in EC2 Insance - hyperledger-fabric

please find the image first intsertion was happened sucessfully.I am trying to query my transaction in Amazon-EC2 but it is returning NULL with endorsement failure even though my insertion transaction is working fine in the local system.
This is the error I get:
endorsement failure during invoke. response: status:500 message:"transaction returned with failure: Error: {\"Error\":\"candidate does not exist with: 13VV1A0533\"}"

From the error it seems that the chaincode is missing error handling for scheduleInterview method.
What the error means is that there is no data for the key candidate id.
Do revert if this doesnt help.

Related

Why can't I commit transactions with Caliper to Hyperledger Fabric?

I've got Caliper configured as a subtree of my custom Fabric blockchain. I have it configured correctly in order to connect the network and am running a small set of tests at the moment. The arguments I'm providing are absolutely correct in terms of the custom chaincode being run, but whenever I try to create a transaction via Caliper I get the error:
Failed to perform submit transaction [CreateAsset] using arguments [<ARGS>], with error: TypeError: Cannot read property 'status' of undefined
Anybody encountered this before with Caliper V0.4.2? It's interfacing with a Fabric 2.3.3 instance on local machine via Kubernetes, with the latest SDK bound.
The error occurs on line 237 of transactions.js inside the node_module fabric-network, where there is a strict property comparison on a commit object.
Also it's worth noting that the querying part of my test rounds is yielding expected results... none of those assets get created due to the error thrown, and when querying for a given asset an error like so occurs:
Failed to perform query transaction [ReadAsset] using arguments [<ID>], with error: Error: error in simulation: transaction returned with failure: Error: The asset <ID> does not exist
The closest thing I've been able to find is this ~2 year old issue which isn't exactly what I'm facing but it's the same sort of error at least... any help or pointers would be greatly appreciated because I'm struggling to glean useful information. (Link: https://github.com/hyperledger/caliper/issues/727)
The issue was due to the host names being converted to localhost when you want to work anything except a network running locally via docker. You need to launch caliper with the following extra option
--caliper-fabric-gateway-localhost false

Implementing Private Data Collection in Hyperledger Fabric 2.0 Error

I tried to implement the private data collections in fabric 2.0 network.I have faced error when I tried to invoke chaincode with the transient data flag.
And it is unable to recognize the method ("priv").
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: transaction returned with failure: Error: You've asked to invoke a function that does not exist: priv"
The "priv" method in chaincode is fairly simple.It is using the putPrivateData() method to store the private data.
I have fixed it.The issue was related to the version of shim api in package.json of chaincode.

Timeout while deploying nodejs based chaincode

I am getting the below error while trying to deploy any nodejs based chaincode on hyperledger 1.4 network :
Error: could not assemble transaction, err proposal response was not
successful, error code 500, msg timeout expired while starting
chaincode
I have even tried the base example chaincode_example02, that is also giving the same error.
Please help.

How to resolve timeout error while executing transactions in hyperledger fabric?

I'm trying to insert bulk data in to blockchain. For 11,000 records records the insert is happening without any fault. But if I try to insert more, Im getting the following error.
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction)
Im using fabric sdk. My fabric verion is 1.2. Can anybody say how to resolve this?
Try to increase the timeout the timeout value. If this dont work, check the chaincode container logs.
Nodejs SDK example

How to solve "Error: endorsement failure during query. response: status:500 message"?

Background: I modified the /examples/e2e_cli/ from Hyperledger-fabric and get this error message when running the end to end script.sh
Error: endorsement failure during query. response: status:500
message:"make sure the chaincode mycc has been successfully
instantiated and try again: getccdata mychannel/mycc responded with
error: could not find chaincode with name 'mycc'"
The chaincode is correctly instantiated. What could actually be causing this error?
This Jira ticket documents the problem and one thing that causes it... which does not seem directly tied to instantiation.
One cause for this error message is that the ports in the configtx.yaml are wrong or missing.
Missing
Addresses:
- orderer0.od1.example.com
- orderer1.od1.example.com
Correct
Addresses:
- orderer0.od1.example.com:7050
- orderer1.od1.example.com:7050

Resources