Kaltura download button issue

Hi All,

I have, some issue with our website kaltura download button functionality.
So we have the same site hosted on 3 environments.
https://www.knowitall.org/video/mike-ethridge-inside-storytelling (the live site)
If you click on download button the video should be downloaded. It works fine on the dev and test, but on the live site (/www.knowitall.org) it gets “failed server problem”. Will be very grateful for any assistance. Please let me know if you need any additional info re this.

Thank you.

Hi @Petrosyan,

Looking at the request triggered by clicking on the “DOWNLOAD THIS VIDEO” <a>, it is the same in both test and prod:

<div class="field-item-ga-video"><a class="no-external-link-msg GoogleAnalyticsET-processed" href="/kaltura_download?file_path=https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike Ethridge | Inside Storytelling.mp4" download="download">Download</a>

If you try:

$ curl -v -L "https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike%20Ethridge%20|%20Inside%20Storytelling.mp4" >/tmp/file.mp4

You will see the file is indeed downloaded correctly so the issue here is not on the Kaltura side of things.

When making the request against your Prod site, one gets HTTP 500 from your Apache:

$ curl "https://www.knowitall.org/kaltura_download?file_path=https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike%20Ethridge%20|%20Inside%20Storytelling.mp4" -v
 * HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Thu, 17 May 2018 13:35:55 GMT
< Server: Apache

Whereas, the request against the test instance:

$ curl -v -I "https://test-knowitall.pantheonsite.io/kaltura_download?file_path=https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike%20Ethridge%20|%20Inside%20Storytelling.mp4"

Goes to an Nginx server and seems to pass through Varnish:

< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Server: nginx
Server: nginx
< Via: 1.1 varnish
Via: 1.1 varnish

I’d start by checking the Apache error logs on your Prod server and also the code /kaltura_download points to on each.

Regardless, just to make sure you are aware of this, the Kaltura player has a download plugin which you can enable via KMC->Studio which will render a download button on the player itself thus saving you from having to implement this function on your own.

Additionally, there is a Kaltura API action called flavorasset->getUrl() that you can also use, rather than build the URL yourself and pass it as a GET param to /kaltura_download as you are doing now.
See https://developer.kaltura.com/api-docs/Convert_and_Transcode_Media/flavorAsset/flavorAsset_getUrl/

For the entry in question, this will return: