내용으로 건너뛰기

AWS Greengrass StreamManager keeps logging "InvalidStreamPositionException: the sequence number is out of bounds" — Am I losing data?

0

I have a Greengrass deployment that includes a custom component as well as the AWS-authored StreamManager component in version 2.1.11. Starting a few hours ago, the StreamManager component has been logging the below sequence of messages every five minutes.

What does this message mean? Is StreamManager still operating normally or is data loss occurring? How can I recover?

I do not have physical access to the system where Greengrass is deployed. The system is online and I am able to create deployments. I am receiving logs from the device in Cloudwatch using AWS Greengrass Logmanager. These logs are taken from the /aws/greengrass/UserComponent/[my-aws-region]/aws.greengrass.StreamManager log group.

2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. 2024 Aug 23 15:55:16,902 [ERROR] (pool-7-thread-1) com.amazonaws.iot.greengrass.streammanager.export.upload.MessageUploaderTask: Encountered Throwable when exporting messages. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. com.amazonaws.iot.greengrass.streammanager.store.exceptions.InvalidStreamPositionException: the sequence number is out of bounds: 17965369. Bounds are from 17965369 to 17965369.. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.store.log.MessageStreamLog.read(MessageStreamLog.java:363) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.store.log.MessageInputStreamHandleLogImpl.read(MessageInputStreamHandleLogImpl.java:32) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at com.amazonaws.iot.greengrass.streammanager.export.upload.MessageUploaderTask.upload(MessageUploaderTask.java:66) ~[AWSGreengrassGreenlake-1.0-super.jar:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700) [?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}
2024-08-23T22:55:16.902Z [INFO] (Copier) aws.greengrass.StreamManager: stdout. at java.lang.Thread.run(Thread.java:829) [?:?]. {scriptName=services.aws.greengrass.StreamManager.lifecycle.startup.script, serviceName=aws.greengrass.StreamManager, currentState=RUNNING}

질문됨 2년 전245회 조회

1개 답변
0
수락된 답변

The error indicates that there is some data loss due to corruption, did you manually delete anything from disk or is the device maybe shutting down unsafely or losing power? This shouldn't be a big problem either way as Stream Manager retries forever and the old data should eventually be overwritten.

AWS

답변함 2년 전

전문가

검토됨 일 년 전

  • Since I posted the question I have learned that the system where Greengrass is running was reset to a Windows restore point. This does indeed explain why StreamManager finds the file-persistence cache be in an inconsistent state. And, of course, any data written to disk after the restore point is lost. But I still do not understand what the implication of this is for the data export. Assuming the system was never offline while new data arrived, can I assume that all data has been forwarded to my configured export (Kinesis) despite this problem with persisting to the file cache?

  • I would expect any data from streams that were processed before the corruption to have been forwarded to the destination correctly, up until around the point of the corruption. If you check your destination and find the last timestamp for your data then data up until that point should all be there.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠