Kaltura 13.6 - Service kaltura-populate not start

When I start the service of kaltura-populate it isn´t start because it doesn´t exist sphinx_log.TYPE in my database:

PHP Fatal error: Uncaught exception ‘PropelException’ with message ’ [wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘sphinx_log.TYPE’ in ‘field list’]’ in /opt/kaltura/app/vendor/propel/util/BasePeer.php:467

Hi @angober,

I imagine this happened after an upgrade?
This column is added by the alter statement in this file:
/opt/kaltura/app/deployment/updates/sql/2017_05_15_add_type_column_sphinx_log.sql
And should have been executed when running:

                php $KALTURA_PREFIX/app/deployment/updates/update.php -i -d >> /opt/kaltura/log/kalt_up.log 2>&1 
                php $KALTURA_PREFIX/app/deployment/updates/update.php -i -s >> /opt/kaltura/log/kalt_up.log 2>&1 

which is triggered from the kaltura-base postinst hook.
Can you check for errors in /opt/kaltura/log/kalt_up.log for errors?

In this particular case, older deployments did not correctly set up the privileges for the kaltura_sphinx_log DB and for that reason, the following statements were also added to the %post hook in the event of an upgrade:
https://github.com/kaltura/platform-install-packages/blob/Mercury-13.7.0/RPM/SPECS/kaltura-base.spec#L245-#L246

Can you try to manually run these and see if they pass correctly?

You didn’t mention whether you are using the RPM or deb packages, for deb, this is done here:
https://github.com/kaltura/platform-install-packages/blob/Mercury-13.7.0/deb/kaltura-base/debian/postinst#L66-#L67
and you can find them under /var/lib/dpkg/info/kaltura-base.postinst.

Thanks,

I upgraded my version 13.0 to 13.6 in my CentOS 6.9

I executed:
php /opt/kaltura/app/deployment/updates/update.php -i -d >> /opt/kaltura/log/kalt_up.log 2>&1
php /opt/kaltura/app/deployment/updates/update.php -i -s >> /opt/kaltura/log/kalt_up.log 2>&1

And I saw in kalt_up.log:
Command [mysql -h127.0.0.1 -ukaltura -p -P3306 kaltura < /opt/kaltura/app/deployment/updates/create_version_mng_table.sql] Executed Successfully

If I executed the SQL --> 2017_05_15_add_type_column_sphinx_log.sql :
mysql -h127.0.0.1 -ukaltura -p -P3306 kaltura </opt/kaltura/app/deployment/updates/sql/2017_05_15_add_type_column_sphinx_log.sql

I saw “ERROR 1146 (42S02) at line 1: Table ‘kaltura.sphinx_log’ doesn’t exist

I don´t have this table sphinx_log in kaltura database. I have table sphinx_log in database kaltura_sphinx_log

Hi @angober,

The sphinx_log table is part of the kaltura_sphinx_log DB, not the kaltura one so:

mysql -h127.0.0.1 -ukaltura -pW9slhg7H3bsh6T4 -P3306 kaltura </opt/kaltura/app/deployment/updates/sql/2017_05_15_add_type_column_sphinx_log.sql

won’t work.

You first need:

echo "GRANT INSERT,UPDATE,DELETE,SELECT,ALTER,DROP,CREATE ON kaltura_sphinx_log.* TO '$DB1_USER'@'%';FLUSH PRIVILEGES;"|mysql -h$DB1_HOST -u $SUPER_USER -p$SUPER_USER_PASSWD -P$DB1_PORT

Then:

mysql -h127.0.0.1 -ukaltura -p -P3306 **kaltura_sphinx_log** </opt/kaltura/app/deployment/updates/sql/2017_05_15_add_type_column_sphinx_log.sql

or just:

echo "ALTER TABLE kaltura_sphinx_log.sphinx_log ADD type INT AFTER created_at;"|mysql -h$DB1_HOST -u $SUPER_USER -p$SUPER_USER_PASSWD -P$DB1_PORT

which is what the postinst script is trying to do. If that fails, please post the error.

Also, I’ve removed the kaltura DB user passwd from your post, please remember to always mask that as this forum is public.

Thanks,

It works fine, thanks. My problem was that the user kaltura only had permissions INSERT, SELECT and UPDATE over kaltura_sphinx_log