Facing Kaltura-db error during the time of installation: error processing package kaltura-db

Hi, while installing Kaltura on Ubuntu Xenial (16.04) referring to the steps mentioned (https://github.com/kaltura/platform-install-packages/blob/Mercury-13.0.0/doc/install-kaltura-xenial.md), I faced the following DB error:

After this operation, 8,192 B of additional disk space will be used.
Get:1 http://installrepo.kaltura.org/repo/apt/xenial lynx/main amd64 kaltura-db all 12.15.0-1+b4 [4,444 B]
Fetched 4,444 B in 1s (4,125 B/s) **
Preconfiguring packages …
Selecting previously unselected package kaltura-db.
(Reading database … 224069 files and directories currently installed.)
Preparing to unpack …/kaltura-db_12.15.0-1+b4_all.deb …
Unpacking kaltura-db (12.15.0-1+b4) …
Setting up kaltura-db (12.15.0-1+b4) …
Checking MySQL version…
innodb_log_file_size => 32M
Please adjust your settings manually and re-run.
dpkg: error processing package kaltura-db (–configure):
** subprocess installed post-installation script returned error exit status 8

Errors were encountered while processing:
** kaltura-db**
E: Sub-process /usr/bin/dpkg returned an error code (1)

The installation process was terminated with this error. Please provide me the necessary details and steps to resolve this issue.
Thanks

Hi,

You got this output because you were prompted with:
"Your MySQL settings are incorrect, do you wish to run kaltura-mysql-settings.sh in order to correct them?"
and selected “NO”.

You can either run:
# dpkg-reconfigure kaltura-db
and select “YES” when prompted, in which case /opt/kaltura/bin/kaltura-mysql-settings.sh will be executed and correct the configuration for you or you can fix the configuration yourself [see /opt/kaltura//bin/kaltura-mysql-settings.sh to understand what needs to be changed] and then run:
# dpkg-reconfigure kaltura-db

Make sure you are using MySQL 5.5 as explained here:

Hi,

I have MySQL Client 5.5 and Percona Server 5.5 installed as it is mentioned in the step by step installation process.

I tried to run dpkg-reconfigure kaltura-db command but it says:
/usr/sbin/dpkg-reconfigure: kaltura-db is broken or not fully installed

I opened /opt/kaltura/bin/kaltura-mysql-settings.sh and it contained following info:
#!/bin/bash -
#===============================================================================

FILE: kaltura-mysql-settings.sh

USAGE: ./kaltura-mysql-settings.sh

DESCRIPTION:

OPTIONS: —

LICENSE: AGPLv3+

REQUIREMENTS: —

BUGS: —

NOTES: —

AUTHOR: Jess Portnoy (), jess.portnoy@kaltura.com

ORGANIZATION: Kaltura, inc.

CREATED: 01/24/14 12:48:32 EST

REVISION: —

#===============================================================================

#set -o nounset # Treat unset variables as an error

if [ -r /etc/my.cnf ];then
MY_CNF=/etc/my.cnf
elif [ -r /etc/mysql/my.cnf ];then
MY_CNF=/etc/mysql/my.cnf
elif [ -r /usr/share/mysql/my-medium.cnf ];then
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
MY_CNF=/etc/my.cnf
else
echo "I could not find your my.cnf file. Exiting."
exit 1
fi
cp $MY_CNF $MY_CNF.orig
sed -i ‘/^lower_case_table_names = 1$/d’ $MY_CNF
sed -i ‘/^open_files_limit.$/d’ $MY_CNF
sed -i '/^max_allowed_packet.
$/d’ $MY_CNF
sed -i ‘s@^[mysqld]$@[mysqld]\nlower_case_table_names = 1\n@’ $MY_CNF
sed -i ‘s@^[mysqld]$@[mysqld]\ninnodb_file_per_table\n@’ $MY_CNF
sed -i ‘s@^[mysqld]$@[mysqld]\ninnodb_log_file_size=32M\n@’ $MY_CNF
sed -i ‘s@^[mysqld]$@[mysqld]\nopen_files_limit = 20000\n@’ $MY_CNF
sed -i ‘s@^[mysqld]$@[mysqld]\nmax_allowed_packet = 16M\n@’ $MY_CNF
if [ -r /var/lib/mysql/ib_logfile0 ];then
mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.old
fi
if [ -r /var/lib/mysql/ib_logfile1 ];then
mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.old
fi

if rpm -q mysql-server 2>/dev/null;then
service mysqld restart
elif rpm -q mariadb-server 2>/dev/null;then
service mariadb restart
elif dpkg -l mysql-server >>/dev/null 2>&1 ;then
service mysql restart
elif dpkg -l “percona-server-server*” >>/dev/null 2>&1 ;then
service mysql restart
elif rpm -qa “Percona-Server-server*” 2>/dev/null;then
service mysql restart
fi

Also checked /etc/hosts file:
127.0.0.1 localhost
127.0.1.1 infy1-OptiPlex-380

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Is there any DNS issue with /etc/hosts file? Please check once and reply if there is any discrepancy in the above files.

The issue in your case has nothing to do with DNS. The postinst script was able to connect to your MySQL, it simply detected your configuration was incorrect, and so, it prompted you with:

Your MySQL settings are incorrect, do you wish to run kaltura-mysql-settings.sh in order to correct them?

You selected NO, so /var/lib/dpkg/info/kaltura-db.postinst exited without completing the package post configuration phase.
Remove the kaltura-db package with:
# aptitude purge kaltura-db
then reinstall it with:
# aptitude install kaltura-db
and this time, when prompted with:

Your MySQL settings are incorrect, do you wish to run kaltura-mysql-settings.sh in order to correct them?
select YES.

And after clicking on YES… What changes should i make?

No changes, the postinst script will just continue to populate the DB. If there are errors, paste them here.

Hi Jess,
we were able to install kaltura without any issues after following the below mentioned steps:
Your MySQL settings are incorrect, do you wish to run kaltura-mysql-settings.sh in order to correct them?
select YES.

We selected no when it asked for ssl in relation to apache and ngnix.

When we tried to access the url “http://infy1-optiplex-380/admin_console/” we could see the tab “Authenticator Code” we are not sure what is the input for the same.

We are getting authentication error when we tried to login to url “https://kmc.kaltura.com/index.php/kmc/kmc” and not able to reset the password as no mail is being received by us in our mailid even though the popout says “An email has been sent to directv.offshore@gmail.com with a link to reset your password. If you don’t see the message in your inbox, check to see if the message is in your spam or junk folders.”

Can you please help us in this?

PFA.

Thanks

Hi,

In Admin Console, input the email and password you provided when running the post install script and leave “Authenticator Code” empty.
Do NOT log into KMC using these credentials. Instead, go to Admin Console->Publishers->Add new Publisher. You will then get an email with a link to set the passwd for this new partner/publisher. Once that’s done, use that email to log into KMC. You can also log in directly from Admin Console by going to Publishers->your partner->Actions->Manage.

Hi jess,
The setup seems to be working now but i am still facing some issue with connectivity. The link which was created (http://infy1-optiplex-380/start/index.php) while installation to access the KALTURA UI is accessible from this PC only where it was installed. If i try to open same link from other PCs in the same network, I am facing 404 Not found error. Can you help me with this?
Also, I have created a channel but i am unable to see the UI as i don’t know the link of the channel i created. Can you please tell me from where i can get the URL of the channel i created through admin console?

Hi @Vaibhav_Sharma,

You need to make sure the hostname/service URL you provided during the configure phase is accessible from both the server itself and from any outside client you intend to use the admin I/Fs or playback from.
My guess is you provided a hostname/service URL that is NOT resolvable from the machine where you make the request from.
This can easily be checked by opening your browser’s dev tools and looking at the requests made in the “Network” tab, then making sure the host used is resolvable.

As for channels, I presume you meant categories? “channels” is a term relevant to Kaltura MediaSpace [based on categories] which I don’t believe you have since it is not FOSS.

If you do mean categories, you can see them under KMC->Content->Categories.
You can create a playlist consisting of all entries in a given category and embed that playlist anywhere you like.
This can be done from KMC->Content->Playlist.

If you’re asking about how you can create a custom page displaying all categories and the entries attached to each, you can use our API to create such pages, for that see:


When calling media->list [https://developer.kaltura.com/api-docs/Ingest_and_Upload_Media/media/media_list], you can filter based on a given category name or ID, which will result in only entries belonging to that category being returned.

As I mentioned, we also have a proprietary product called Kaltura MediaSpace [KMS] for which you can see a demo here:
http://portal.mediaspace.kaltura.com/

If you’re interested in purchasing that, feel free to contact our sales team.