node.js - 从 super 账本结构获取 "Error: 8 RESOURCE_EXHAUSTED: Sent message larger than max (2217 vs. 15)"

标签 node.js hyperledger-fabric hyperledger grpc

我正在尝试执行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/

相关文章:

node.js - 如何使用 AWS Lambda 按名称查询 dynamoDB 表

ssl - 织物订购者 TLS : failed to find any PEM data in certificate input

benchmarking - Hyperledger Fabric 有性能基准测试工具吗?

mongodb - node.js 的 mongoose 中的十进制/ float

javascript - 如何正确链接到nodejs curve25519库

hyperledger-fabric - super 账本结构 :TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress

docker - 无法通过 NodeJS 查询/调用 Hyperledger Fabric Peer(在 docker swarm 网络中)- GRPC/S 截止日期错误

node.js - 作为守护进程运行的带有 redis 的 Docker 容器不运行

hyperledger-fabric - 为什么 Hyperledger Fabric 通过编译源代码而不是二进制来安装链码?