8 RESOURCE_EXHAUSTED: grpc: received message larger than max (120126016 vs. 104857600) - hyperledger-fabric

I am using IBM Blockchain VSCode extension for testing hyperlerdger fabric node js chaincode. But I faced an issue when I tried to install a chaincode on a peer.
Error
Failed to install on peer Org1Peer1 with reason: 8 RESOURCE_EXHAUSTED: grpc: received message larger than max (120126016 vs. 104857600)
What does it mean? Can anyone guide me?

The maximum payload size for a Fabric transaction is 100MB (including metadata, etc). Your chaincode package seems to be extraordinarily large.

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

Network error occurs when Node.js SDK sends peer transactions

I' m using Hyperledger Fabric 1.4.3 with the following conditions.
Ubuntu 18.04
CouchDB
Raft
TLS enabled
Using discovery service
Endorsement policy: "AND ('Org0MSP.peer')"
When I send 100 transactions asynchronously from Node.js SDK, all transactions are processed normally.
But, I send 2000 transactions asynchronously, the following error occurs.
[Node.js SDK log]
[DiscoveyEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: Failed to connect before the deadline URL::grpcs//peer0.org0:7051
[Peer log]
[core.com] SerdrHandshake -> ERRO TLS handshake failed with error read tcp {org0 peer ip address:port} -> {Node.js SDK server ip address:port}: i/o timeout server=PeerServer remoteaddress={Node.js SDK server ip address:port}
So, some transactions failed.
Why does this error occur? Is there any way to solve this error?
When you say 'asynchronously' I assume you mean 'concurrently'. The error being returned is an i/o timeout, so this would indicate to me that most likely, your server hardware is not fast enough to handle the volume of concurrent requests you are attempting.
If you are concerned about denial of service, you can employ standard techniques for limiting the number of concurrent connections to your peer such as via network proxies. If you are simply trying to test the throughput bounds of Fabric, I would try slowly ramping up your transaction rate until you begin to see errors such as this timeout.

Issue with hyprledger node sdk on calling API?

When i am upgrading and instantiating chaincode for first time and then i hit a API from node sdk then i get below error for first time only.
"Peer localhost:7051 has rejected transaction \"1b0f72d31c2d2baa1b7fa2d5f079ba62982f67359b30a490dae901d74b8a3a1d\"
with code \"ENDORSEMENT_POLICY_FAILURE\"","stack":"Error: Peer
localhost:7051 has rejected transaction
\"1b0f72d31c2d2baa1b7fa2d5f079ba62982f67359b30a490dae901d74b8a3a1d\"
with code \"ENDORSEMENT_POLICY_FAILURE\"\n
Please tell me how can i resolve this issue ?
Its seems issue with endorsement policy, check if your transaction is endorsed by all required endorser in the network.
You must be get endorsed by all endorser to commit the transaction in peer world state.
I solved this issue by adding "grpc.keepalive_timeout_ms": 20000 in connection.js file in node sdk.
For more information visit here

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

error when creating channel with kafka ordering service

I'm trying to setup hyperledger fabric 1.2 on different hosts.
But when creating channel via: ./peer.sh channel create -o orderer0.trade.com:7050 -c tradechannel -f ../tradechannel.tx --cafile tlsca.trade.com-cert.pem -t 150s.
I got this error in CLI: got unexpected status: SERVICE_UNAVAILABLE -- will not enqueue, consenter for this channel hasn't started yet
and here is log from orderer:
[channel: tradechannel] Rejecting broadcast of message from 192.168.167.149:60655 with SERVICE_UNAVAILABLE: rejected by Consenter: will not enqueue, consenter for this channel hasn't started yet.
Closing Broadcast stream
transport: http2Server.HandleStreams failed to read frame: read tcp 192.168.171.33:7050->192.168.167.149:60655: read: connection reset by peer
It seems I have problem with grpc but totally have no idea about this.
the CLI is in Macbook and Orderer runs in RedHat.
I also faced the same issue when I was spawning the hyperledger fabric on kubernetes using kafka as ordering service.
The error is coming because kafka need some to sync with zookeepers. So you can wait for some time after the blockchain network creation. Then create the channel. In my case I wait for 10 minutes and I am able to create a channel.
But when I am spawning the fabric network using docker and kafka as ordering service this error never occurs and in this case kafka synchronise with zookeepers very fast, I don't why no error "rejected by Consenter: will not enqueueenter image description here".

Resources