从hyperledger结构获取“错误:8 RESOURCE_EXHAUSTED:发送的消息大于最大值(2217对15)”

问题描述 投票:1回答:2

我正在尝试执行https://github.com/hyperledger/fabric-samples.git中提供的“balance-transfer”结构样本,并且当它执行来自testAPIs.sh的以下代码时,它会获得GRPC最大限制错误。请建议我如何解决它。

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"
}'`

错误

[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)
node.js hyperledger-fabric hyperledger grpc
2个回答
2
投票

在“平衡转移”应用程序的更新版本中,他们已从grpc-max-send-message-length的Orderer下列出的grpcOptions中删除了network-config.yaml

之前该值设置为15,导致此问题。


1
投票

你可以设置:

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

在您的对等或连接客户端上的网络config.yaml中。

© www.soinside.com 2019 - 2024. All rights reserved.