Media entry folder

thank you, Jess, we start with /opt/Kaltura/web/content/entry/data/0/0 as local storage as we start to go out of space we try to add extra local storage (which is actually NFS storage mounted to /opt/Kaltura/web/content/entry/data/0/2)
Can you explain how can I achieve this, I try to add remote storage profile:
Storage Base Directory : /opt/Kaltura/web/content/entry/data/0/2
Path Manager: Kaltura Path
Delivery Details
Delivery profile ids (JSON)
{“http”:[2]}
Format/Type/Delivery profiles
http VOD 2 (default)
What happen:

  1. it generate folder hierarchy:
    /opt/kaltura/web/content/entry/data/0/2/content/entry/data/0/0
    and export files successfully
  2. can’t play any file on any player, player error " Media File not found"

Note:
when i try Path manage: external it create hierarchy /opt/kaltura/web/content/entry/data/0/2/20170207/0/
but doesn’t export files to it the files reside under /opt/kaltura/web/content/entry/data/0/0/ as usual

I create delivery profile
Delivery Info
Delivery profile Type*: Local_Path_HTTP
Streamer Type*: auto
Supported Media Protocols:
Delivery profile URL*: http://<Server_URL>/content/entry/data/0/2/content/entry/data/0/0
the new video upload successfully and export to /content/entry/data/0/2/content/entry/data/0/0 and when i try to browse video file it works fine (e.g. http://<Server_URL>/content/entry/data/0/2/content/entry/data/0/0/0_bwjyjf3t_0_uldo6fg4_2.mp4

when i try to trace what is going on in kaltura_api_v3.log i found its request
http://<Server_URL>/p/104/sp/10400/playManifest/entryId/0_u2govdcc/flavorId/0_0iyoluw0/format/http/protocol/http/cdnHost/adtv1.linkstream.tv/ks/MzdjMzQ0MTFkMjBhZTM4NmFkOGRhNmVjZDdhYmQwNGI2M2M1YTgzMnwxMDQ7MTA0OzE0ODY2MzY3NDc7MjsxNDg2NTUwMzQ3LjM0NzM7U0VCVFZAbGlua3N0cmVhbS50djtkaXNhYmxlZW50aXRsZW1lbnQ7Ow==/uiConfId/23448498/a/a.f4m?referrer=aHR0cDovL2FkdHYxLmxpbmtzdHJlYW0udHYvaW5kZXgucGhwL2ttYy9rbWM0I2NvbnRlbnR8bWFu

which return the xml contains

and this is the default URL what is the missing step, appreciate any advice

it works :slight_smile:
in the remote storage delivery profile you should select your custom delivery profile. in my case it was not appears

  1. tail kaltura_api_v3.log -f | grep -i “delivery_profile”

  2. go to preview& edit and request your media file to play

  3. in my case the query was
    SELECT
    count(*)
    FROM
    delivery_profile
    WHERE
    delivery_profile.PARTNER_ID IN (‘0’, ‘104’)
    AND delivery_profile.TYPE NOT IN (
    ‘10135’,
    ‘10136’,
    ‘1013’,
    ‘1002’,
    ‘1001’,
    ‘1003’,
    ‘1005’,
    ‘1006’,
    ‘1007’,
    ‘1008’,
    ‘1009’,
    ‘1010’
    )
    AND delivery_profile. STATUS IN (‘0’, ‘3’)
    AND delivery_profile.STREAMER_TYPE = ‘http’

  4. so I go to my delivery profile and change in "Delivery Info"
    Delivery profile Type*: http
    Streamer Type*: http

then the profile appears in the remote storage configuration, i hope this can help

HLS is not working after add secondary storage, player request to the server is return valid result after adding apple_http delivery profile to new remote_storage
post below request in browser
https://kaltura_server/p/100/sp/10000/playManifest/entryId/0_vprb3flx/flavorIds/0_5ho7lg36,0_ofbige6w,0_5m5l18va,0_peabnnje/format/applehttp/protocol/https/a.m3u8?referrer=aHR0cHM6Ly9lbHdhc2ZhLmNvbQ==&playSessionId=2d8490e1-a0e1-97f3-ca5a-b0feee343085&clientTag=html5:v2.50&uiConfId=23448410&responseFormat=jsonp&callback=jQuery111107614982261180181_1487015028983&_=1487015028984

#####Result

jQuery111107614982261180181_1487015028983({“entryId”:“0_vprb3flx”,“duration”:45,“baseUrl”:"",“flavors”:[{“url”:“https://kaltura_server/content/entry/data/0/1/content/entry/data/0/0/0_vprb3flx_0_5ho7lg36_2.mp4”,“ext”:“mp4”,“bitrate”:915,“width”:640,“height”:360,“audioLanguage”:null,“audioLanguageName”:null,“audioLabel”:null},{“url”:“https://kaltura_server/content/entry/data/0/1/content/entry/data/0/0/0_vprb3flx_0_ofbige6w_2.mp4”,“ext”:“mp4”,“bitrate”:1498,“width”:1024,“height”:576,“audioLanguage”:null,“audioLanguageName”:null,“audioLabel”:null},{“url”:“https://kaltura_server/content/entry/data/0/1/content/entry/data/0/0/0_vprb3flx_0_5m5l18va_2.mp4”,“ext”:“mp4”,“bitrate”:2500,“width”:1280,“height”:720,“audioLanguage”:null,“audioLanguageName”:null,“audioLabel”:null},{“url”:"https://<kaltura_server>/content/entry/data/0/1/content/entry/data

But no player can play the files even if i can play them individually

any advice ?

I think i got the error but i can’t fix it, in the kaltura_nginx_errors.log
2017/02/13 23:34:54 [error] 12291#12291: *2669 upstream sent no valid HTTP/1.0 header while reading response header from upstream, client: 10.11.11.157, server: kaltura_server, request: “GET /hls/content/entry/data/0/1/content/entry/data/0/0/0_aao10og7_0_1v0zp91j_2.mp4/index.m3u8 HTTP/1.1”, upstream: “http://172.17.0.2:80/hls/content/entry/data/0/1/content/entry/data/0/0/0_aao10og7_0_1v0zp91j_2.mp4/index.m3u8”, host: “linkdcvp.linkstream.tv:8443”, referrer: “https://linkdcvp.linkstream.tv/index.php/kmc/kmc4

i’m using ssl settin and all delivery profile

1006 100 2017-02-09 22:37:31 2017-02-13 20:52:14 Storage2http 4 Storage2http https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 http 0 0 0
1007 100 2017-02-13 19:56:16 2017-02-13 20:52:19 Applehttp 1 https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 0
1008 100 2017-02-13 20:54:35 2017-02-13 23:15:34 HLS 25 https://kaltura_server/content/entry/data/0/1/ kaltura_server 2 auto 0 0 a:1:{s:13:“rendererClass”;s:25:“kRedirectManifestRenderer”;} 0
1009 100 2017-02-13 22:10:40 2017-02-13 22:49:15 Mine_hls 61 Mine_hls Mine_hls https://kaltura_server:8443/hls/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 0
1010 100 2017-02-13 22:42:00 2017-02-13 23:25:20 HDS_mine 63 HDS_mine https://kaltura_server:88/hds/content/entry/data/0/1/ kaltura_server 0 hdnetworkmanifest 0 0 a:3:{s:13:“rendererClass”;s:20:“kF4MManifestRenderer”;s:18:“adStitchingEnabled”;b:0;s:20:“allowFairplayOffline”;b:0;} 0
1011 100 2017-02-13 22:53:30 2017-02-13 23:08:00 Mine_http 14 Mine_http Mine_http https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 http 0 0 a:2:{s:15:“supportClipping”;b:1;s:14:“useIntelliseek”;b:0;} 0
1012 100 2017-02-13 22:56:59 2017-02-13 23:08:05 Mine_akami_hls 10 Mine_akami_hls Mine_akami_hls https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 a:1:{s:15:“supportClipping”;b:0;} 0
1013 100 2017-02-13 23:00:43 2017-02-13 23:08:11 mine_dash 68 mine_dash mine_dash https://kaltura_server:88/dash/content/entry/data/0/1/ kaltura_server 0 mpegdash 0 0 0

Hi @nabil_naim1,

is https://kaltura_server:8443 a load balancer? If so, please see my reply here:

In addition, what does the delivery_profile look like? please post the result for:

mysql> select * from delivery_profile where id=$YOUR_ID\G 

Be sure to mask sensitive info when doing so.
In addition, make sure internal_ip_range in /opt/kaltura/app/configurations/local.ini is correctly set, that directive should reflect:
range of ip addresses belonging to internal kaltura servers. The range is used when checking service actions permissions and allowing to access certain services without KS from the internal servers.

If all that checks out and validated and you still have an issue, I’m going to need a sample player embed to look at.

thank jess for reply, its not load balance setup and this problem only happen with videos on new remote storage “/opt/kaltura/web/content/entry/data/0/1/content/entry/data/0/0” the default storage videos work very good “/opt/kaltura/web/content/entry/data/0/0”

Kindly find below mysql> select * from delivery_profile where id=$YOUR_ID\G

1006 100 2017-02-09 22:37:31 2017-02-13 20:52:14 Storage2http 4 Storage2http https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 http 0 0 0
1007 100 2017-02-13 19:56:16 2017-02-13 20:52:19 Applehttp 1 https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 0
1008 100 2017-02-13 20:54:35 2017-02-13 23:15:34 HLS 1001 https://kaltura_server/content/entry/data/0/1/ kaltura_server 2 auto 0 0 a:1:{s:13:“rendererClass”;s:25:“kRedirectManifestRenderer”;} 0
1009 100 2017-02-13 22:10:40 2017-02-13 22:49:15 Mine_hls 61 Mine_hls Mine_hls https://kaltura_server:8443/hls/content/entry/data/0/1/ kaltura_server 0 applehttp 1 0 0
1010 100 2017-02-13 22:42:00 2017-02-13 23:25:20 HDS_mine 63 HDS_mine https://kaltura_server:88/hds/content/entry/data/0/1/ kaltura_server 0 hdnetworkmanifest 1 0 a:3:{s:13:“rendererClass”;s:20:“kF4MManifestRenderer”;s:18:“adStitchingEnabled”;b:0;s:20:“allowFairplayOffline”;b:0;} 0
1011 100 2017-02-13 22:53:30 2017-02-13 23:08:00 Mine_http 14 Mine_http Mine_http http://kaltura_server/content/entry/data/0/1/ kaltura_server 1 http 1 0 a:2:{s:15:“supportClipping”;b:1;s:14:“useIntelliseek”;b:0;} 0
1012 100 2017-02-13 22:56:59 2017-02-13 23:08:05 Mine_akami_hls 10 Mine_akami_hls Mine_akami_hls http://kaltura_server/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 a:1:{s:15:“supportClipping”;b:0;} 0
1013 100 2017-02-13 23:00:43 2017-02-13 23:08:11 mine_dash 68 mine_dash mine_dash https://kaltura_server:88/dash/content/entry/data/0/1/ kaltura_server 0 mpegdash 1 0 0

When i check tail kaltura_nginx_errors.log -f all my request to videos at new storage gives this error

2017/02/15 14:41:04 [error] 15871#15871: *1 upstream sent no valid HTTP/1.0 header while reading response header from upstream, client: 10.11.11.157, server: kaltura_server, request: “GET /hls/content/entry/data/0/1/content/entry/data/0/0/0_l1anrkhv_0_ameuirkh_2.mp4/index.m3u8 HTTP/1.1”, upstream: “http://172.17.0.2:80/hls/content/entry/data/0/1/content/entry/data/0/0/0_l1anrkhv_0_ameuirkh_2.mp4/index.m3u8”, host: “kaltura_server:8443”, referrer: “https://kaltura_server/index.php/kmc/kmc4”

  1. it change https request to http request
  2. it call the server virual ip “172.17.0.2”
  3. i can serve http://172.17.0.2:80/content/entry/data/0/1/content/entry/data/0/0/0_l1anrkhv_0_ameuirkh_2.mp4, but i can’t serve http://172.17.0.2:80/hls/content/entry/data/0/1/content/entry/data/0/0/0_l1anrkhv_0_ameuirkh_2.mp4

when i run any video from default storage is work fine on the same server (its all in one) with same player
also find below curl -I -v https://kaltura_server:8443

[root@kaltura_server 0]# curl -I -v https://kaltura_server:8443

  • About to connect() to kaltura_server port 8443 (#0)
  • Trying 172.17.0.2… connected
  • Connected to kaltura_server (172.17.0.2) port 8443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • Peer’s certificate issuer is not recognized: ‘CN=Let’s Encrypt Authority X3,O=Let’s Encrypt,C=US’
  • NSS error -8179
  • Closing connection #0
  • Peer certificate cannot be authenticated with known CA certificates
    curl: (60) Peer certificate cannot be authenticated with known CA certificates
    More details here: http://curl.haxx.se/docs/sslcerts.html

Hi @nabil_naim1,

I don’t see the actual query results in the post… please repost them.
As for the curl request to https://kaltura_server:8443, look carefully:)

* Peer certificate cannot be authenticated with known CA certificates
curl: (60) Peer certificate cannot be authenticated with known CA certificates

When using let’s encrypt [which is perfectly valid, I use it all the time], you must configure Nginx to use the fullchain.pem, this should solve the issue.

1006 100 2/9/2017 22:37 2/13/2017 20:52 Storage2http 4 Storage2http https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 http 0 0 0
1007 100 2/13/2017 19:56 2/13/2017 20:52 Applehttp 1 https://kaltura_server/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 0
1008 100 2/13/2017 20:54 2/13/2017 23:15 HLS 1001 https://kaltura_server/content/entry/data/0/1/ kaltura_server 2 auto 0 0 a:1:{s:13:“rendererClass”;s:25:“kRedirectManifestRenderer”;} 0
1009 100 2/13/2017 22:10 2/13/2017 22:49 Mine_hls 61 Mine_hls Mine_hls https://kaltura_server:8443/hls/content/entry/data/0/1/ kaltura_server 0 applehttp 1 0 0
1010 100 2/13/2017 22:42 2/13/2017 23:25 HDS_mine 63 HDS_mine https://kaltura_server:88/hds/content/entry/data/0/1/ kaltura_server 0 hdnetworkmanifest 1 0 a:3:{s:13:“rendererClass”;s:20:“kF4MManifestRenderer”;s:18:“adStitchingEnabled”;b:0;s:20:“allowFairplayOffline”;b:0;} 0
1011 100 2/13/2017 22:53 2/13/2017 23:08 Mine_http 14 Mine_http Mine_http http://kaltura_server/content/entry/data/0/1/ kaltura_server 1 http 1 0 a:2:{s:15:“supportClipping”;b:1;s:14:“useIntelliseek”;b:0;} 0
1012 100 2/13/2017 22:56 2/13/2017 23:08 Mine_akami_hls 10 Mine_akami_hls Mine_akami_hls http://kaltura_server/content/entry/data/0/1/ kaltura_server 0 applehttp 0 0 a:1:{s:15:“supportClipping”;b:0;} 0
1013 100 2/13/2017 23:00 2/13/2017 23:08 mine_dash 68 mine_dash mine_dash https://kaltura_server:88/dash/content/entry/data/0/1/ kaltura_server 0 mpegdash 1 0 0

sorry it refuse to upload it as execl

Also new remote storage delivery profile is as attached

May be this is better
mysql> SELECT partner_id, type,name, url , is_default FROM delivery_profile where partner_id =100;

Hi @nabil_naim1,

Sorry but it’s hard to debug without an actual embed example. Please provide one and I’ll be happy to take a look.

ofcourse, here is the embed code and if you want remote session we can adjust that

<script src="https://linkdcvp.linkstream.tv/p/100/sp/10000/embedIframeJs/uiconf_id/23448423/partner_id/100"></script>
<div id="kaltura_player_1487177087" style="width: 560px; height: 395px;"></div>
<script>
kWidget.embed({
  "targetId": "kaltura_player_1487177087",
  "wid": "_100",
  "uiconf_id": 23448423,
  "flashvars": {
    "streamerType": "auto"
  },
  "cache_st": 1487177087,
  "entry_id": "0_l1anrkhv"
});
</script>

Any feedback ? i still stuck in this step

i got why ngnix convert request from https to http
Success URL is /hls/p/100/sp/10000/serveFlavor/entryId/0_qk1y3nmp/v/2/flavorId/0_utxv5b6i/name/a.mp4/index.m3u8
when i add the secondary storage the request url turns to
/hls/content/entry/data/0/1/content/entry/data/0/0/0_l1anrkhv_0_ameuirkh_2.mp4/index.m3u8
the last URL missing the “/p/” and partner_id and other attributes, the ngnix can\t treat through hls block.
anyone can guide me how this /p/ and others are added to url ?
any advice will be highly appreciated

Hi @nabil_naim1,

Looking at the embed you provided, the problem is with this request:
https://linkdcvp.linkstream.tv/p/100/sp/10000/playManifest/entryId/0_l1anrkhv/flavorIds/0_ameuirkh,0_6vws42vx/format/applehttp/protocol/https/a.m3u8?referrer=aHR0cDovL2plc3NleA==&playSessionId=6512ee72-9846-afa0-feeb-0bc78ddae0d9&clientTag=html5:v2.50&uiConfId=23448423&responseFormat=jsonp&callback=jQuery111105870628652283001_1487598734049&_=1487598734050

If you exec:

curl -I -v "https://linkdcvp.linkstream.tv/p/100/sp/10000/playManifest/entryId/0_l1anrkhv/flavorIds/0_ameuirkh,0_6vws42vx/format/applehttp/protocol/https/a.m3u8?referrer=aHR0cDovL2plc3NleA==&playSessionId=6512ee72-9846-afa0-feeb-0bc78ddae0d9&clientTag=html5:v2.50&uiConfId=23448423&responseFormat=jsonp&callback=jQuery111105870628652283001_1487598734049&_=1487598734050"

You’ll see:

  • HTTP 1.0, assume close after body
    < HTTP/1.0 404 Not Found
    HTTP/1.0 404 Not Found
    X-Kaltura-App: exiting on error 6 - requested flavor was not found
    X-Kaltura: cached-error-6
    X-Me: linkdcvp.linkstream.tv

So, my guess is the remote storage profile is saving the files to a path that is different than the one the delivery profile expects.
To further debug this, have a look at /opt/kaltura/log/kaltura_api_v3.log as well as the Apache error log.

please try again as i was disable the secondary remote storage to avoid any upload to it, i enable it now and the response is
< HTTP/1.1 200 OK
HTTP/1.1 200 OK

OK, now the failure is here:

https://linkdcvp.linkstream.tv:8443/hls/content/entry/data/0/1/content/entry/data/0/0/0_l1anrkhv_0_ameuirkh_2.mp4/index.m3u8
Which leads to:
HTTP/1.1 404 Not Found

Let me explain again how the default HLS delivery profile works and then you can make sure whatever you’ve overridden works in a similar way.
I’m pasting sample URLs from my own host: jessex.

First call of interest from the player’s end is the playManifest one:
http://jessex/p/102/sp/10200/playManifest/entryId/0_22bqymiq/flavorIds/0_uqs3qqh6,0_e0lgehpv,0_ip2l71zy,0_04kzo9dh/format/applehttp/protocol/http/a.m3u8

When using the default HLS profile [ID 1001 in the delivery_profile table], this will lead to /opt/kaltura/app/alpha/lib/model/DeliveryProfileVodPackagerHls.php
If look at this file, you’ll see the DeliveryProfileVodPackagerHls class extends the DeliveryProfileAppleHttp, which in turn extends DeliveryProfileVod, where you will find the getBaseUrl() function.

Long flow short, doGetFlavorAssetUrl() in /opt/kaltura/app/alpha/lib/model/DeliveryProfileVodPackagerHls.php will return http://jessex:88/hls/p/102/sp/10200/serveFlavor/entryId/0_22bqymiq/v/2/flavorId/0_uqs3qqh6/name/a.mp4/index.m3u8, this request will be made to the Nginx. Now, if you look at the Nginx conf [/opt/kaltura/nginx/conf/kaltura.conf or /etc/nginx/conf.d/kaltura.conf depending on whether this is the RPM or deb package], you’ll find:

                # serve flavor HLS
                location ~ ^/hls/p/\d+/(sp/\d+/)?serveFlavor/ {
                        vod hls;
                        vod_bootstrap_segment_durations 2000;
                        vod_bootstrap_segment_durations 2000;
                        vod_bootstrap_segment_durations 2000;
                        vod_bootstrap_segment_durations 4000;

                        add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
                        add_header Access-Control-Allow-Headers "*";
                        add_header Access-Control-Expose-Headers "Server,range,Content-Length,Content-Range";
                        add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS";
                        add_header Access-Control-Allow-Origin "*";
                        expires 100d;
                }

So, not sure what you’ve done in your custom delivery profile class but I hope this will help you understand what you need to change.

Also, note that with curl you still get:

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

When making the request from a browser, this is forgiven but still, I recommend you fix it by including the CA cert in the file you set the Nginx ssl_certificate directive to in ssl.conf.

thank you for informative reply, is this hls delivery profile is correct if my new storage mounted @
/opt/kaltura/web/content/entry/data/0/1/

*************************** 16. row ***************************
id: 1009
partner_id: 100
created_at: 2017-02-13 22:10:40
updated_at: 2017-02-13 22:49:15
name: Mine_hls
type: 61
system_name: Mine_hls
description: Mine_hls
url: https://linkdcvp.linkstream.tv:8443/hls/content/entry/data/0/1/
host_name: linkdcvp.linkstream.tv
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 1
parent_id: 0
custom_data: NULL
priority: 0
*************************** 17. row ***************************