0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fabric-samples/balance-transfer 実行時の "Sent message larger than max" エラー回避策メモ

Last updated at Posted at 2018-04-15

発生している事象

(2018/4/15)
Hyperledger Fabric v1.1 にて、fabric-samples/balance-transfer 実行時、以下のようにエラーが発生してAPIの実行ができなかったので、その回避策をメモ

cd fabric-samples/balance-transfer
./runApp.sh
./testAPI.sh -l golang

発生したエラーメッセージはこちら

[2018-04-15 05:23:17.671] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature:  Signature {
  r: <BN: 1fa0d0a2977f6f3205f8db855a4ac382fa1caf2d6ec162662b086d6902ef5f05>,
  s: <BN: 6232ab2aa62cddd99da3f5526befcc7bd147e234935f67394e6b5ee7a33eabf5>,
  recoveryParam: 1 }
[2018-04-15 05:23:17.682] [ERROR] Create-Channel - Error: Sent message larger than max (2219 vs. 15)
    at ClientDuplexStream._emitStatusIfDone (/home/ubuntu/dev/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:255:19)
    at ClientDuplexStream._receiveStatus (/home/ubuntu/dev/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:233:8)
    at /home/ubuntu/dev/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:757:12
(node:15115) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to initialize the channel: Error: Sent message larger than max (2219 vs. 15)
(node:15115) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

原因と回避策

grpcのリクエストに乗せようとしているデータ量のサイズが、制限値よりもオーバーしているとのこと
(この場合は artifacts/channel/mychannel.tx を送信しようとしてエラーになっている)
network-config.yamlでgrpcOptionが変えられるため、無制限の-1を指定して再起動しましょう

vi balance-transfer/artifacts/network-config.yaml
grpc-max-send-message-length: 15
grpc-max-send-message-length: -1

以上

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?