Problem while configuring hyperledger fabric - hyperledger-fabric

I am quite new to Hyperledger Fabric. I have strictly followed all Prerequisites in addition to other steps to run the test-network. I am facing the following error:
**
(Error: endorsement failure during query. response: status:500
message:"make sure the chaincode fabcar has been successfully defined
on channel mychannel and try again: chaincode fabcar not found" ).
**
As inquired, the version of hyperledger fabric is as follows:
Please note that the solution here did not solve my problem. Furthermore, digging more on it I also note that I can not get any response if I try to check peer chaincode list --installed . I even tried the accepted answer but its not working. Kindly please guide me.

I would add to Kartik's question, are you using the test network to get started? If not, I would start with the tutorial first and if you get stuck, share the logs and we will do our best to help.

Related

Hyperledger fabric 1.4 chaincode instantiate constenser error

I am using Hyperledger fabric 1.4 with raft as ordering service. whenever I tried to instantiate the chaincode, the command get stucked and after waiting so long there is no output.
I am getting the warning like rejecting the delivering request for- because of constenser error.
please help me to fix this out.
below here image is attached that depict the error
Logs orderer

Hyper ledger fabric-channel creation Node SDK -Error

Im trying to create a channel using node SDK and get the following error.
Failed to evaluate transaction: Error: Orderer with name:orderer.example.com not found
A wild guess but you chang the exapmle to example.
Apart from that, the Error means the SDK cannot communicate with the Orderer. Either it is not up or it is known by a different url.
The orderer is not up.
The best thing you can do it to set the logging level for the orderer to DEBUG and check is logs.
It is crashing for some reason, you can see the logs and try to understand what happens.
If you post here the logs I'm happy to hlelp you.

Hyperledger Fabric: Error: could not assemble transaction: ProposalResponsePayloads do not match

what are the steps to troubleshoot below error when trying to invoke a chaincode?
Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:<status:200 payload:"[\"00000\"]" > ...
we get this error when trying to invoke a chaincode using peer chaincode invoke
#morpheus: Has answered it excellently:
So I thought I will add to the above list of possible reasons:
I had by mistake added something like getting the current timestamp, and was using this for capturing the event date. This led to the different transaction responses by the endorsers, thus leading to the Response Payload not matching. The whole point to remember is that the result of execution should be deterministic as it is going to be run on all of the selected endorsing peers.
So use ctx.GetStub().GetTxTimestamp() for capturing the event time. This is the time when the transaction began and it will be constant across the endorser executions.
Check that you have installed the chaincode on all the peers your peer chaincode invoke command is targetting. That is the most likely cause of this error.
Other ways this error can occur:
You modified your chaincode and instead of installing a new version and upgrading the chaincode, you tried to be smart and overwrite the chaincode with the new file thinking that Fabric would not notice.
It can also happen if there is no chaincode container running on target peer and Docker daemon cannot be found on the peer node when it tries to instantiate a container or instantiation fails for some other reason
Another reason why this error can happen is if some peer nodes are using LevelDB and others are using CouchDB
The error itself originates from here. The first step to debug this error is to invoke the chaincode individually one-by-one on one peer node at a time.
Another reason that I forgot to check is using storing randomly generated values.
I never used random "Id" until now and didn't notice that it leads to ENDORSEMENT_MISMATCH

Endorement Error while invoking chain code

I have a hyperledger fabric network setup in multiple servers and I successfully installed chaincode in different peers(peer0.org1.com and peer0.org2.com) of different organizations.
When I call the chaincode with putState(key,value) from peer0.org1.com I am able to commit the change but when I call the same chaincode from peer0.org2.com putstate(key, value) is failing with endorsement error.
This might be because you didn't include peer0.org2.com in the endorsement policy while installing the chaincode.
Ex: Include OR/AND ('ORG1MSP.member','ORG2MSP.member') in chaincode installation step
I hope this solves the issue

"No identity" error in Hyperledger Fabric

I've worked on 1.06 version of Hyperledger Fabric.
For "Fabcar" tutorial, when I generate a lot of transactions at the same time through "Invoke.js"(I used loop), an error message is shown during execution and stops transactions from being sent, which is:
"No identity has been assigned to this client"
I'm not able to send transactions due to this error. I'm so sure that client is valid because I have only one client.
Is this a bug?
Could you please tell me how to resolve this error if you know?
I would really appreciate if you help me solve it.
the below link might be useful for you.
How to assign identity to fabric-client instance?
And I faced the same issue as well, however it is resolved after adding the below line, i.e., channel initialization.
`await channel.initialize({
discover: true
});`
source: https://fabric-sdk-node.github.io/master/tutorial-discovery.html

Resources