404 error for timeshift requests

0

Hi all,

I'm hving problems while following the documentation under https://docs.aws.amazon.com/mediapackage/latest/ug/time-shifted.html.

When I try to execute a test call via
curl -vL --globoff "https://xxx.mediapackage.eu-central-1.amazonaws.com/out/v1/xxx/index.m3u8?start=1529935200&end=1529935500"
or
curl -vL --globoff "https://xxx.mediapackage.eu-central-1.amazonaws.com/out/v1/xxx/index.m3u8?start=2019-06-13T11:40:00_02:00&end=2018-06-13T11:50:00_02:00"

Here is the verbose output of the curl request:

  • Trying 35.156.198.119...
  • TCP_NODELAY set
  • Connected to xxx.mediapackage.eu-central-1.amazonaws.com (35.156.198.119) port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/cert.pem
    CApath: none
  • TLSv1.2 (OUT), TLS handshake, Client hello (1):
  • TLSv1.2 (IN), TLS handshake, Server hello (2):
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
  • TLSv1.2 (IN), TLS handshake, Server key exchange (12):
  • TLSv1.2 (IN), TLS handshake, Server finished (14):
  • TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
  • TLSv1.2 (OUT), TLS change cipher, Client hello (1):
  • TLSv1.2 (OUT), TLS handshake, Finished (20):
  • TLSv1.2 (IN), TLS change cipher, Client hello (1):
  • TLSv1.2 (IN), TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
  • ALPN, server accepted to use h2
  • Server certificate:
  • subject: CN=xxx.mediapackage.eu-central-1.amazonaws.com
  • start date: Jan 15 00:00:00 2019 GMT
  • expire date: Feb 15 12:00:00 2020 GMT
  • subjectAltName: host "xxx.mediapackage.eu-central-1.amazonaws.com" matched cert's "xxx.mediapackage.eu-central-1.amazonaws.com"
  • issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
  • SSL certificate verify ok.
  • Using HTTP2, server supports multi-use
  • Connection state changed (HTTP/2 confirmed)
  • Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  • Using Stream ID: 1 (easy handle 0x7fc7b1806e00)

GET /out/v1/xxx/index.m3u8?start=1529935200&end=1529935500 HTTP/2
Host: xxx.mediapackage.eu-central-1.amazonaws.com
User-Agent: curl/7.54.0
Accept: /

  • Connection state changed (MAX_CONCURRENT_STREAMS updated)!
    < HTTP/2 404
    < date: Thu, 13 Jun 2019 12:07:30 GMT
    < content-type: text/html; charset=iso-8859-1
    < content-length: 18
    < server: AWS Elemental MediaPackage
    < x-mediapackage-request-id: 6039b18130b49d4568cd9f001bc94fec
    <
  • Connection #0 to host xxx.mediapackage.eu-central-1.amazonaws.com left intact

A 404 error is returned. Am I doing something wrong or is the documentation outdated?

Any input on this issue would be greatly appreciated!

All the best,
Björn

Edited by: BjoernPuttmann on Jun 13, 2019 6:25 AM

asked 5 years ago366 views
5 Answers
0

Hi Björn,

Thanks for asking this question in the forum, The URL you are using to request the manifest appears to be correct, however the end date you have entered is in 2018, which is before the start date. Please correct this and try again. Also, the epoch dates 1529935200 and 1529935500 translate to GMT: Monday, June 25, 2018 2:00:00 PM and 02:05:00pm

Remembering that the maximum length of a manifest is 9 hours as outlined under https://docs.aws.amazon.com/mediapackage/latest/ug/limits-live.html
and there maximum content retention of 14 days.

curl -vL --globoff "https://xxx.mediapackage.eu-central-1.amazonaws.com/out/v1/xxx/index.m3u8?start=2019-06-13T11:40:00_02:00&end=2018-06-13T11:50:00_02:00"

Thanks
Richard

Edited by: RichardB-AWS on Jun 13, 2019 7:22 AM

AWS
answered 5 years ago
0

Hello Richard,

thanks for your reply!

You are absolutely right, the curl command was wrong.

but after correcting the parameters:
curl -vL --globoff "https://528dc4ef17d725ed.mediapackage.eu-central-1.amazonaws.com/out/v1/deca9a76c2e64835b43b79748c7a62bb/index.m3u8?start=2019-06-14T09:30:00_02:00&end=2019-06-14T09:50:00_02:00"

I still get a 404:

  • Connection state changed (MAX_CONCURRENT_STREAMS updated)!
    < HTTP/2 404
    < date: Fri, 14 Jun 2019 08:55:46 GMT
    < content-type: text/html; charset=iso-8859-1
    < content-length: 18
    < server: AWS Elemental MediaPackage
    < x-mediapackage-request-id: 81de06bdedb79487ee5cc80b76cfb7dc
    <
  • Connection #0 to host 528dc4ef17d725ed.mediapackage.eu-central-1.amazonaws.com left intact

In the MediaPackage configuration, Startover window is set to 36000, so the timeframe should fit into the window size.

Any ideas on what might be wrong?

Take care,
Björn

answered 5 years ago
0

Hi Björn

The command you are using is correct, as is the documentation. When I try to use the same syntax I get a 403 error so I am assuming there is whitelist in use on your deployment.

Because of the nature of the problem can I please ask that you open a support ticket with AWS, that way we can track the progress while trouble shooting your issue, however looking briefly at the Database records the last segment was written

2019-06-14 04:32:39 (UTC) is the last endpoint segment time

so it looks like the endpoint has either been deleted or ingest has stopped.
Thanks
Richard

Edited by: RichardB-AWS on Jun 14, 2019 10:56 AM

Edited by: RichardB-AWS on Jun 14, 2019 10:58 AM

AWS
answered 5 years ago
0

Hi Richard,

yes, you are right. I turned off the stream over the weekend. And for good measure, I recreated the Endpoint configuration from scratch, so the Endpoint URL changed.

Still, I get the 404:

  • Connection state changed (MAX_CONCURRENT_STREAMS updated)!
    < HTTP/2 404
    < date: Mon, 17 Jun 2019 07:14:30 GMT
    < content-type: text/html; charset=iso-8859-1
    < content-length: 18
    < server: AWS Elemental MediaPackage
    < x-mediapackage-request-id: aaea8e7d5ef81564a7880dda36baa96d

So I will follow your advice and open up a support ticket.

Thank you very much for your help and take care,
Björn

answered 5 years ago
0

We were able to solve the issue.

What was missing was the correct timecode configuration in MediaLive:
What we changed:
Channel general settings -> Timecode configuration: from „EMBEDDED“ to „SYSTEMCLOCK“
Channel -> Output groups -> Output Group -> Stream settings -> Codec Settings h264 -> Timecode: from „DISABLED“ to „PIC_TIMING_SEI“

With these configurations in place, time shifted viewing was functional.

Thanks again for the help here and all the best,
Björn

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions