Dpkg: error processing package kaltura-db (--configure):

Hi experts.

I have the tipical issue related ins the deb-deployment clusters.

My enviroment is deb-based and i have one index, one front, one batch, one DWh, one VOD and one media server. This is a Test Enviroment. Howewevr I have deployed everything correct (i assume). I am stuck in the step “apt-get install kaltura-db” in the post instructions https://github.com/kaltura/platform-install-packages/blob/master/doc/deb-cluster-deployment-instructions.md. In this post it is recomended to use the repository “http://installrepo.kaltura.org/repo/apt/debian”, however and according to new issue more updated the experts recommends to use “http://installrepo.origin.kaltura.org/repo/apt/debian-11.16.0-xenial kajam”.

Every thing it seems correct including the $curl step to the own enviroment return me a HTTP 200 OK. But when I tried to install the kaltura-node and populoate the database i have this error.

“lower_case_table_names=1
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 7
Errors were encountered while processing:
kaltura-db
E: Sub-process /usr/bin/dpkg returned an error code (1)”

I think it coold be a repo issue because this falls even before the database population. It never starts to ppopulate. Maybe, do I have to configure another repo in the sources list??

Please can you give some updates, for example where is the error_log for this command in order to get more info about the exit code… or how i make this command more verbose??

Maybe is a Mysql configuration?? I have see in another issue that maybe i must to edit the my.cnf to other values in the mysql NODE

Env INFO

  • Kaltura 13 last release
  • All nodes Ubuntu 16
  • Setenforce permissive enable
  • Sphin node it seems to be correct
  • Acces from the Front Node to the mysql server Node is checked

Thanks for all

Hi @jlotito,

I’ve updated the deb cluster deployment doc.
For Ubuntu 16, the most important sections to review are:

and:

Ubuntu 16 necessitated a different repo from the one used for Debian Jessie and Ubuntu 14.04. Also since we do not support MySQL 5.7 which is the official version for the mysql-package in the 16 repos, you will need to deploy MySQL 5.5 from a different repo. We recommend the Percona package [see deployment instructions in the guide].

If, after following the new instructions, you’re still having issues, please post the full output of the APT command that is failing and I’ll gladly assist you further.
As the guide states, please be aware that the Percona packages cannot co-exist with the Xenial mysql-server packages so if you already deployed the MySQL 5.7 packages, please be sure to purge them before continuing.

Thanks,

Thanks for your soon answer Jess

I had to redeploy in order to configure the correct version of mysql but after that… Every thing is correct!!!

Without being so impertinent and do not argue about how you have desing Kaltura… Only I wolud like to ask why this env is not prepared by default to be deploy the Mysql NODE in AWS RDS. At first we have deployed our production env with an EC2 with myql installed. But this was our most popular failure point. Beacuse the service went out so often. So We decide one yaer ago to deploy to an RSD instance in AWS… which allow you to forget anythin about configuration and maintenace. But the problem exists that the mysql deploy includes some root functions and scripts. That can be approached in an aws instance due to permissions.

So what I am requesting for future releases is to try to convert those scripts in mysql to bash scripts and simple querys and root actions to kaltura user actions. That allow us to use aws RDS instances.

Please notice me if these improvment could be achieve in any time.

Thanks for all

Hi experts

These issue is not still solved. I have foolow the instructions but i am stuck i the same step. After making the curl step in my front NODE which returns a 200 OK. I am trying to install kaltura-db package but cant afford. these is the output

apt-get install kaltura-db
Reading package lists… Done
Building dependency tree
Reading state information… Done
kaltura-db is already the newest version (13.10.0-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up kaltura-db (13.10.0-1+b1) …
Checking MySQL version…
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
innodb_log_file_size => 32M
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 7
Errors were encountered while processing:
kaltura-db
E: Sub-process /usr/bin/dpkg returned an error code (1)

I think that could be the kaltura-settings.sh script becuase nothing change when i run it… The problem is that follow the instructions to install mysql in ubuntu 16 with percona makes that there IS NO MY.CNF. there is another method whcih involved a directory conf.d/mysql.cnf… editing that script and settting the features accroding to the scripts I alwyas get the same message for every variable… mysql: unknown variable ‘open_files_limit=20000’. So cant set the variables in mysql 5.5 in ubntu 16 installed with percona… maybe that produce the error in the FRONT

ENV INFO

  • All nodes Ubutnu 16
  • deb cluster with one node for each service
  • Kaltura 13 last release
  • Sources.list.d/kaltura.list --> deb [arch=amd64] http://installrepo.kaltura.org/repo/apt/xenial mercury main
  • mysql Ver 14.14 Distrib 5.5.59-38.11, for debian-linux-gnu (x86_64) using readline 5.1

Hi @jlotito,

According to your output, /var/lib/dpkg/info/kaltura-db.postinst exited with RC 7, this only happens if:
check_mysql_settings() [defined in /opt/kaltura/bin/kaltura-functions.rc] did not return true AND the MySQL host you provided is NOT the same as the machine you deployed the kaltura-db package on.
See /var/lib/dpkg/info/kaltura-db.postinst lines 135-148.

Since /opt/kaltura/bin/kaltura-mysql-settings.sh needs to change values in the my.cnf file, it has to run from a root shell on the machine where the DB resides. If you ran it on a different machine, it will do nothing.

On the machine where you deployed the percona-server-server-5.5 you should have /etc/mysql/my.cnf but by default, it is empty, other than the line:

!includedir /etc/mysql/conf.d/

and /etc/mysql/conf.d/ only includes mysql.cnf which is also empty.

With this default config, running /opt/kaltura/bin/kaltura-mysql-settings.sh will do nothing, this script is only meant to correct things in case these directives are set to the wrong values, it doesn’t handle the case where these directives are not set at all.

You should simply add the following lines to /etc/mysql/my.cnf manually:

[mysqld]
lower_case_table_names = 1
innodb_file_per_table
innodb_log_file_size=32M
open_files_limit = 20000
max_allowed_packet = 16M

then:

# rm /var/lib/mysql/ib_logfile*

And restart the MySQL daemon.

To make sure the values are now correct, you can run this commands from the MySQL console:

mysql> select @@open_files_limit;
+--------------------+
| @@open_files_limit |
+--------------------+
|              20000 |
+--------------------+
1 row in set (0.00 sec)

mysql> select @@lower_case_table_names;
+--------------------------+
| @@lower_case_table_names |
+--------------------------+
|                        1 |
+--------------------------+
1 row in set (0.00 sec)

mysql> select @@innodb_log_file_size;
+------------------------+
| @@innodb_log_file_size |
+------------------------+
|               33554432 |
+------------------------+
1 row in set (0.00 sec)

mysql> select @@max_allowed_packet;
+----------------------+
| @@max_allowed_packet |
+----------------------+
|             16777216 |
+----------------------+
1 row in set (0.00 sec)

Note that the values I mentioned here are the min values the Kaltura Server can work with, depending on your resources and needs you may want to set higher values.

After that’s done, from the machine you’ve installed the kaltura-db package on, simply run:

# apt install -f

this should trigger the re-execution of /var/lib/dpkg/info/kaltura-db.postinst and this time, check_mysql_settings() will return true and the post install script will continue to run and populate your DB.