Kaltura Installed but can NOT access admin console

By default, the Kaltura HTML5 player always uses HLS for playback, unless the video is shorter than 10 seconds, in which case, there is no point in using adaptive bitrate protocols for delivery.
The Nginx VOD module is what’s responsible for generating HLS, HDS and DASH manifests, which is why it is critical for kaltura-nginx to be properly installed and for the daemon to run.

What happens when you run:
# /opt/kaltura/nginx/sbin/nginx -c /opt/kaltura/nginx/conf/nginx.conf
from the shell?

root@kmc:~# /opt/kaltura/nginx/sbin/nginx -c /opt/kaltura/nginx/conf/nginx.conf
nginx: [emerg] bind() to 0.0.0.0:88 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:88 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:1935 failed (98: Address already in use)
nginx: [emerg] still could not bind()
root@kmc:~#

OK, let’s see what is occupying these ports then…
# netstat -plnt
?

root@kmc:~# netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1642/sshd
tcp 0 0 0.0.0.0:88 0.0.0.0:* LISTEN 16570/nginx
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3832/master
tcp 0 0 0.0.0.0:9312 0.0.0.0:* LISTEN 21099/searchd
tcp 0 0 0.0.0.0:59489 0.0.0.0:* LISTEN 455/rpc.statd
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 13270/mysqld
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 18067/memcached
tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN 16570/nginx
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 440/rpcbind
tcp6 0 0 :::22 :::* LISTEN 1642/sshd
tcp6 0 0 :::25 :::* LISTEN 3832/master
tcp6 0 0 :::50319 :::* LISTEN 455/rpc.statd
tcp6 0 0 :::111 :::* LISTEN 440/rpcbind
tcp6 0 0 :::80 :::* LISTEN 2284/apache2
root@kmc:~#

So it looks as though the Nginx daemon is running…
what does:
# service kaltura-nginx status
say?
if it says it is running, then let’s try:
# service kaltura-nginx stop
make sure it is down and run:
# aptitude install -f
this will rerun the kaltura-nginx postinst script again [/var/lib/dpkg/info/kaltura-nginx.postinst] since the last attempt returned with a return code other than a 0, causing the kaltura-nginx package status to be marked as incomplete.

root@kmc:~# service kaltura-nginx status
● kaltura-nginx.service - LSB: starts the nginx web server
Loaded: loaded (/etc/init.d/kaltura-nginx)
Active: active (running) since Wed 2017-05-03 12:34:52 UTC; 35min ago
Process: 16566 ExecStart=/etc/init.d/kaltura-nginx start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/kaltura-nginx.service
├─16570 nginx: master process /opt/kaltura/nginx/sbin/nginx
├─16571 nginx: worker process
├─16572 nginx: worker process
├─16573 nginx: worker process
├─16574 nginx: worker process
└─16575 nginx: cache manager process

May 03 12:34:52 kmc.abcdomain.com kaltura-nginx[16566]: Starting nginx: nginx.
May 03 12:34:52 kmc.abcdomain.com systemd[1]: Started LSB: starts the nginx web server.

root@kmc:~# service kaltura-nginx stop
root@kmc:~# aptitude install -f
The following partially installed packages will be configured:
kaltura-nginx
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up kaltura-nginx (1.12-2) …
Job for kaltura-nginx.service failed. See ‘systemctl status kaltura-nginx.service’ and ‘journalctl -xn’ for details.
dpkg: error processing package kaltura-nginx (–configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-18+deb8u7) …
Errors were encountered while processing:
kaltura-nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up kaltura-nginx (1.12-2) …
Job for kaltura-nginx.service failed. See ‘systemctl status kaltura-nginx.service’ and ‘journalctl -xn’ for details.
dpkg: error processing package kaltura-nginx (–configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-18+deb8u7) …
Errors were encountered while processing:
kaltura-nginx

root@kmc:~#

I can see once running the video, the .m3u8 file is running after http://127.0.0.1:88, Please check.

Hm… need to understand why the postinst script fails when dpkg tries to run it…
Can you try:

# service kaltura-nginx start

edit /var/lib/dpkg/info/kaltura-nginx.postinst and change:

#!/bin/bash

to read:

#!/bin/bash -x

and then:

# aptitude install -f

again and paste the full output for this one?

root@kmc:~# aptitude install -f
The following partially installed packages will be configured:
kaltura-nginx
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up kaltura-nginx (1.12-2) …

  • ldconfig
  • ‘[’ configure = configure ‘]’
  • . /usr/share/debconf/confmodule
    ++ ‘[’ ‘!’ ‘’ ‘]’
    ++ PERL_DL_NONLAZY=1
    ++ export PERL_DL_NONLAZY
    ++ ‘[’ ‘’ ‘]’
    ++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/kaltura-nginx.postinst configure ‘’
  • ldconfig
  • ‘[’ configure = configure ‘]’
  • . /usr/share/debconf/confmodule
    ++ ‘[’ ‘!’ 1 ‘]’
    ++ ‘[’ -z ‘’ ‘]’
    ++ exec
    ++ ‘[’ ‘’ ‘]’
    ++ exec
    ++ DEBCONF_REDIR=1
    ++ export DEBCONF_REDIR
  • db_get kaltura-nginx/nginx_hostname
  • _db_cmd ‘GET kaltura-nginx/nginx_hostname’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/nginx_hostname’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=kmc.abcdomain.com
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • ‘[’ -z kmc.abcdomain.com ‘]’
  • db_input critical kaltura-nginx/nginx_hostname
  • _db_cmd ‘INPUT critical’ kaltura-nginx/nginx_hostname
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘INPUT critical kaltura-nginx/nginx_hostname’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=‘30 question skipped’
  • case ${_db_internal_line%%[ ]*} in
  • return 30
  • true
  • db_go
  • _db_cmd 'GO ’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ 'GO ’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=ok
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • db_get kaltura-nginx/nginx_hostname
  • _db_cmd ‘GET kaltura-nginx/nginx_hostname’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/nginx_hostname’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=kmc.abcdomain.com
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • VOD_PACKAGER_HOST=kmc.abcdomain.com
  • db_input critical kaltura-nginx/nginx_port
  • _db_cmd ‘INPUT critical’ kaltura-nginx/nginx_port
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘INPUT critical kaltura-nginx/nginx_port’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=‘30 question skipped’
  • case ${_db_internal_line%%[ ]*} in
  • return 30
  • true
  • db_go
  • _db_cmd 'GO ’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ 'GO ’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=ok
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • db_get kaltura-nginx/nginx_port
  • _db_cmd ‘GET kaltura-nginx/nginx_port’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/nginx_port’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=88
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • VOD_PACKAGER_PORT=88
  • db_input critical kaltura-nginx/rtmp_port
  • _db_cmd ‘INPUT critical’ kaltura-nginx/rtmp_port
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘INPUT critical kaltura-nginx/rtmp_port’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=‘30 question skipped’
  • case ${_db_internal_line%%[ ]*} in
  • return 30
  • true
  • db_go
  • _db_cmd 'GO ’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ 'GO ’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=ok
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • db_get kaltura-nginx/rtmp_port
  • _db_cmd ‘GET kaltura-nginx/rtmp_port’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/rtmp_port’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=1935
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • RTMP_PORT=1935
  • db_get kaltura-nginx/kaltura_service_url
  • _db_cmd ‘GET kaltura-nginx/kaltura_service_url’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/kaltura_service_url’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=kmc.abcdomain.com
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • db_input critical kaltura-nginx/kaltura_service_url
  • _db_cmd ‘INPUT critical’ kaltura-nginx/kaltura_service_url
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘INPUT critical kaltura-nginx/kaltura_service_url’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=‘30 question skipped’
  • case ${_db_internal_line%%[ ]*} in
  • return 30
  • true
  • db_go
  • _db_cmd 'GO ’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ 'GO ’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=ok
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • db_get kaltura-nginx/kaltura_service_url
  • _db_cmd ‘GET kaltura-nginx/kaltura_service_url’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/kaltura_service_url’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=kmc.abcdomain.com
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • WWW_HOST=kmc.abcdomain.com
  • db_input critical kaltura-nginx/is_ssl
  • _db_cmd ‘INPUT critical’ kaltura-nginx/is_ssl
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘INPUT critical kaltura-nginx/is_ssl’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=‘30 question skipped’
  • case ${_db_internal_line%%[ ]*} in
  • return 30
  • true
  • db_go
  • _db_cmd 'GO ’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ 'GO ’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=ok
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • db_get kaltura-nginx/is_ssl
  • _db_cmd ‘GET kaltura-nginx/is_ssl’
  • _db_internal_IFS=’
  • IFS=’ ’
  • printf ‘%s\n’ ‘GET kaltura-nginx/is_ssl’
  • IFS=’
  • IFS=’
  • read -r _db_internal_line
  • RET=false
  • case ${_db_internal_line%%[ ]*} in
  • return 0
  • IS_NGINX_SSL=false
  • ‘[’ false = true ‘]’
  • touch /opt/kaltura/nginx/conf/ssl.conf
  • PROTOCOL=http
  • sed -e s#@VOD_PACKAGER_HOST@#kmc.abcdomain.com#g -e s#@VOD_PACKAGER_PORT@#88#g -e s#@RTMP_PORT@#1935#g -e s#@LOG_DIR@#/opt/kaltura/log/nginx# -e s#@WWW_HOST@#kmc.abcdomain.com#g /opt/kaltura/nginx/conf/nginx.conf.template
  • sed -e s#@STATIC_FILES_PATH@#/opt/kaltura/nginx/static#g -e s#@PROTOCOL@#http#g /opt/kaltura/nginx/conf/kaltura.conf.template
  • update-rc.d kaltura-nginx defaults
  • chown -R kaltura /opt/kaltura/log/nginx
  • service kaltura-nginx reload
    Processing triggers for libc-bin (2.19-18+deb8u7) …

root@kmc:~#

OK, so looks like the postinst passed successfully… what’s the output for:
# dpkg -l kaltura-nginx
?

As for your last question, during the configuration phase, you provided 127.0.0.1 as the hostname for Nginx, this is why you cannot retrieve the manifest, it should be a hostname/IP that’s accessible from all machines you’d like playback to work from.
To fix it now, you’ll need to update the kaltura MySQL DB:

# source /etc/profile.d/kaltura-base.sh
# mysql -h$DB1_HOST -u$DB1_USER -p$DB1_PASS kaltura
mysql> update delivery_profile set url='http://$NGNIX_FQDN_HOST:88/hls' where id=1001;
mysql> update delivery_profile set url='http://$NGNIX_FQDN_HOST:88/hds' where id=1002;
mysql> update delivery_profile set url='http://$NGNIX_FQDN_HOST:88/dash' where id=1003;

Of course, port 88 TCP needs to be open for communication from the machine where you attempt playback.
Note that 88 is just a default, it can be changed to anything you want.

root@kmc:~# dpkg -l kaltura-nginx
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±====================================-=======================-=======================-=============================================================================
ii kaltura-nginx 1.12-2 amd64 Nginx web/proxy server - for Kaltura
root@kmc:~#

OK, good, so that’s fine. The status is ‘ii’ meaning the package is correctly installed and configured.
See my comment about the Nginx host. Once that’s fixed, everything should work.

Done

I guess it’s now loading, but it’s loading the entire 5 minutes at one time, the /index.m3u8 is the entire file, how can we shrink it to 5 seconds per .ts?

Why do you think it’s loading the entire 5 minutes at one time?
The line you highlighted is just the request for the manifest… in the sniffer, you should see individual requests for the segments, like so:
$NGINX_HOST/hls/p/$PARTNER_ID/sp/$PARTNER_ID00/serveFlavor/entryId/$ENTRY_ID/v/12/flavorId/$FLAV_ID/name/a.mp4/seg-4-v1-a1.ts

The default segment duration is 10s but it can be changed.
See:

Sent you an email as an example - However i’ve tried to check the url you provided but could’t understand it correctly, is there a command or a configuration on the kaltura admin console can be changed for a quick edit?

I replied to your email.
You simply need to run these commands:

# source /etc/profile.d/kaltura-base.sh
# mysql -h$DB1_HOST -u$DB1_USER -p$DB1_PASS kaltura
mysql> update delivery_profile set url='http://$NGNIX_FQDN_HOST:88/hls' where id=1001;
mysql> update delivery_profile set url='http://$NGNIX_FQDN_HOST:88/hds' where id=1002;
mysql> update delivery_profile set url='http://$NGNIX_FQDN_HOST:88/dash' where id=1003;

Replacing $NGNIX_FQDN_HOST with your actual host.

Thanks, now all seems good, i have 4 questions to complete start a fully functional kaltura package:

  • how to make kaltura rely on MaxCDN as it’s CDN
  • how to make kaltura rely on Amazon S3 as it’s storage
  • How to limit the bandwidth for a specific publisher?
  • is there a description for the settings of the admin console? especially the “add new publisher” and “profiles”?

Hi @JohnMalcom,

Please see my explanation about remote storage and delivery profiles here:

As for bandwidth limitation, see my reply here:

The Admin Console’s “Add New Publisher” form calls partner->register(), see https://developer.kaltura.com/api-docs/Secure_Control_and_Govern/partner/partner_register

The “Service Edition Type” is only meant for reporting/accounting purposes, same as “Class of Service” and "Vertical Classification"
The “Template Partner ID” selectbox only has one value by default but if you make the partner->register() API call directly, you can pass any existing partner as a template. This can be a powerful mechanism for cloning settings and content for different partner types.
If no templatePartnerId is passed as a parameter to the register action, the default behaviour is to clone content from partner 99 [which is a system partner created during deployment time] and different configuration profiles [delivery, storage, etc] from partner 0, likewise created during the deployment.

Thanks Jess, Would you please help what to insert in the fields requested when creating a new S3 storage? it requires username and password, but i’m not sure its related to the owner account, we use a key for backups using WHM anyway.

Please advise.

Also when using a SFTP as external storage, uploading a movie then click on preview, it didn’t work and this is the url that doesn’t work

http://abcdomain.com/p/101/sp/10100/playManifest/entryId/0_e26zq5d8/flavorIds/0_5au6caf5,0_j6wbqk75/format/applehttp/protocol/http/a.m3u8?referrer=aHR0cDovL2xvY2FsaG9zdA==&playSessionId=146c187f-91eb-e02e-4137-7028f87

not sure why it is requesting “protocol/http/a.m3u8” however i have enabled a delivery profile and added a random url, but not reflected.

btw i have added the SFTP and working well.

Now i don’t understand the below:

  • when i should use “Drop Folders”
  • how to use a “CDN” url to replace all the live links with a CDN one, specially the ones embeded inside the player html5 code (that will be shared with a website owner to insert the code in his website).

I have to add that, the videos is uploaded to the ftp in just 1 file, not separate, i thought kaltura will send the transcoded ones, .m3u3 and .ts files - so this is correct? it should send the files to our ftp like that?