Hyperledger对等容器宕机的原因是什么



我一直在Hyperledger Fabric测试网络上试验4个对等体(所有对等体都在同一台机器上(,我注意到当我强调网络时,对等体容器(以及相应的链代码容器(会宕机

我正在努力找出发生这种情况的原因,但我对Hyperledger Fabric和Docker还很陌生,我不知道是否遗漏了什么

当我试图一次将大量数据摄入网络(即在单个事务中(时,对等容器会关闭。起初,我认为问题出在我的数据量上(文档指定80-90MB为支持的最大事务负载大小(,但容器失败的数据比指定的最大大小少得多(单个事务中为30-35MB(

我尝试对数据进行分块并发出多个事务(每个分块一个(,但容器仍然失败。到目前为止,我已经尝试了10MB和20MB块

你认为这里的问题是什么
考虑到测试网络在一台机器上运行,我对背靠背调用的测试网络的压力有多大
区块大小,是否可能导致任何缓冲区溢出(即,当对等方为每个事务生成读/写集时,数据量爆炸(
其他

TBH,我相信前面提到的都是罪魁祸首,但如果你想缩小问题的范围,请与我分享。

谢谢:(

编辑:
configtx.yaml片段

# Batch Timeout: The amount of time to wait before creating a batch
BatchTimeout: 10s
# Batch Size: Controls the number of messages batched into a block
BatchSize:
# Max Message Count: The maximum number of messages to permit in a batch
MaxMessageCount: 10
# Absolute Max Bytes: The absolute maximum number of bytes allowed for
# the serialized messages in a batch.
AbsoluteMaxBytes: 500 MB
# Preferred Max Bytes: The preferred maximum number of bytes allowed for
# the serialized messages in a batch. A message larger than the preferred
# max bytes will result in a batch larger than preferred max bytes.
PreferredMaxBytes: 4 MB

**成功提交2个数据块的数据输出:**区块大小设置为10MB,结果是1个约8MB的区块和1个只有几KB的区块(因为它只保留一些元数据(
#0 Transaction id is: ccea3260d2b92bfa8678426a876edad1e0322b21395c5210169f54acd14b945e
#1 Transaction proposal successfully sent to channel.
Chaincode invocation proposal response #0 was good
#2 Looped through the proposal responses all_good= 1
#3 Registered the Tx Listener
#4 Transaction has been submitted.
#0 Transaction id is: a685edfe9421dd0f88d048ea3f7851c2f553af759cba84f88a8f438ae096def2
#1 Transaction proposal successfully sent to channel.
Chaincode invocation proposal response #0 was good
#2 Looped through the proposal responses all_good= 1
#3 Registered the Tx Listener
#4 Transaction has been submitted.
#5 Received Tx Event
The chaincode invoke chaincode transaction has been committed on peer localhost:7051
Transaction ccea3260d2b92bfa8678426a876edad1e0322b21395c5210169f54acd14b945e is in block 7
0_metadata { is_completed: 'false', status: 'PENDING', pending: 1 }
#5 Received Tx Event
The chaincode invoke chaincode transaction has been committed on peer localhost:7051
Transaction a685edfe9421dd0f88d048ea3f7851c2f553af759cba84f88a8f438ae096def2 is in block 8
0 { is_completed: 'true', status: 'VALID', pending: 0 }

**8个数据块的数据提交输出不成功:**chuck大小也设置为10MB,其中一个chunk用于元数据,其他chunk各为~10MB。为每个未能提交的区块打印以下输出
...
#0 Transaction id is: 066ef0c386b8986bb1a2497e613b7bc1e0a2edc12308fd56ed0d9f5931cb58ea
#1 Transaction proposal successfully sent to channel.
Chaincode invocation proposal response #0 was bad!
#2 Looped through the proposal responses all_good= 0
#3 Registered the Tx Listener
2021-03-30T10:00:03.913Z - error: [Channel.js]: sendTransaction - no valid endorsements found
Error: no valid endorsements found at Channel.sendTransaction (/home/erodotos/Desktop/gitub_project_stavroulla/Model-Meta-Database/app/node_modules/fabric-client/lib/Channel.js:3003:10)
at submitPage (/home/erodotos/Desktop/gitub_project_stavroulla/Model-Meta-Database/app/server.js:169:23)
at async /home/erodotos/Desktop/gitub_project_stavroulla/Model-Meta-Database/app/server.js:601:13

1st更好地查看对等日志。您可以使用容器化的docker日志这可能会给您一些提示。如果需要更多信息,请使用FABRIC_LOGGING_SPEC=debug环境变量将日志级别更改为调试。

最新更新