1

I am trying to execute "balance-transfer" fabric sample provided in https://github.com/hyperledger/fabric-samples.git, and when it is executing following code from testAPIs.sh it is getting GRPC max limit error. Please suggest how I can fix it.

Code in testAPIs.sh

`curl -s -X POST \
  http://localhost:4000/channels \
  -H "authorization: Bearer $ORG1_TOKEN" \
  -H "content-type: application/json" \
  -d '{
    "channelName":"mychannel",
    "channelConfigPath":"../artifacts/channel/mychannel.tx"
}'`

Error

[2018-05-11 16:34:15.115] [ERROR] Create-Channel - Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2217 vs. 15)
    at createStatusError (/home/amandai/blockchain/fabric-samplesV1/fabric-samples-1.1/balance-transfer/node_modules/grpc/src/client.js:64:15)
    at ClientDuplexStream._emitStatusIfDone (/home/amandai/blockchain/fabric-samplesV1/fabric-samples-1.1/balance-transfer/node_modules/grpc/src/client.js:270:19)
    at ClientDuplexStream._readsDone (/home/amandai/blockchain/fabric-samplesV1/fabric-samples-1.1/balance-transfer/node_modules/grpc/src/client.js:236:8)
    at readCallback (/home/amandai/blockchain/fabric-samplesV1/fabric-samples-1.1/balance-transfer/node_modules/grpc/src/client.js:296:12)
(node:16186) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Failed to initialize the channel: Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2217 vs. 15)
david_k
  • 5,843
  • 2
  • 9
  • 16
chinmaya.mahunta
  • 133
  • 2
  • 10

2 Answers2

2

You can set:

grpcOptions:
  grpc-max-send-message-length: -1

In the network config.yaml on your peer or connecting client.

dwhores
  • 43
  • 1
  • 7
2

In the updated version of "balance-transfer" application, they have removed the grpc-max-send-message-length from grpcOptions listed under Orderer in network-config.yaml

Earlier the value was set to 15 which was causing this issue.

Blockies
  • 61
  • 7