我正在尝试执行https://github.com/hyperledger/fabric-samples.git中提供的“平衡转移”织物样本,当它执行 testAPIs.sh 中的以下代码时,会出现 GRPC max limit 错误。 请建议我如何修复它。
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)
最佳答案
您可以设置:
grpcOptions:
grpc-max-send-message-length: -1
在对等点或连接客户端上的网络 config.yaml 中。
关于node.js - 从 super 账本结构获取 "Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2217 vs. 15)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50293910/