aws-samples / amazon-kinesis-video-streams-producer-embedded-c

Light-wight Amazon Kinesis Video Streams Producer SDK For FreeRTOS/Embedded Linux
Apache License 2.0
27 stars 17 forks source link

[QUESTION] Getting error 5001 after pushing frames. How to debug? #51

Closed gtapizquent closed 2 years ago

gtapizquent commented 2 years ago

I put together an app using the Linux sample code, which was working fine until last week. This week it started to consistently fail with a log as follows:

Jan 25 09:00:02.136 Info: 100-continue^M
Jan 25 09:00:02.234 Info: Fragment buffering, timecode:18446744071867076041^M
Jan 25 09:00:02.555 Info: Fragment received, timecode:18446744071867076041^M
Jan 25 09:00:02.565 Info: Fragment buffering, timecode:18446744071867078043^M
Jan 25 09:00:02.732 Error: Time:Tue Jan 25 09:00:02 2022 File:amazon-kinesis-video-streams-producer-embedded-c/src/source/restful/kvs/restapi_kvs.c Func:prvLogFragmentAck Line:512 PutMedia session error id:5001^M

From the documentation error 5001 is: 5001 - ARCHIVAL_ERROR - Kinesis Video Streams failed to persist fragments to the data store.

For reference, I have a similar app using this SDK: https://github.com/awslabs/amazon-kinesis-video-streams-producer-c which is pushing the same media, and it doesn't fail.

How can I debug this issue?

weichihl commented 2 years ago

@gtapizquent It seems somehow S3 is unable to store this fragment. Which region do you use? Do both apps use the same KVS stream name? Is data protection enabled in C SDK? Could you try to change to another KVS stream or change the region in the app that uses this embedded producer library so we can see if this issue relates to the server-side?

gtapizquent commented 2 years ago

@weichihl I am using the same KVS stream (not at the same time). Region is us-west-2 As I mentioned, using the exact same stream information works for the c producer. And it was working with the embedded c SDK until last week. Nothing changed from the app side. Would this require opening a ticket via the IoT Console so they can help me look at the backend logs?

weichihl commented 2 years ago

@gtapizquent I think it helps by opening a ticket because this error is reported from S3 to KVS.

gtapizquent commented 2 years ago

I figured out this issue. It was caused by bad timestamps being sent from the device. Thanks.