Kaltura CE5 Analytics

Kaltura CE5 is one of the best video management systems (VMS) and content management system (CMS) out there.
To start off it’s an open source project meaning it’s free and you get a really extensive system with all the features needed for a rich content project.
To find out more about it check Kaltura community site.

In a recent project of mine I was asked to fix some Kaltura analytics issues on CentOS release 6.2 (Final).

Recognize the problem

When you log in to the KMC Dashboard, you don’t see any analytic. After going in to the reports section no analytics can be found.

Kaltura CE5 Analytics Not Working Image

Kaltura CE5 Analytics Not Working

Debugging the problem

Kaltura data warehouse (DWH) is the component handling Kaltura analytics.

The entire analytics feature can be found under /opt/kaltura/dwh.  the folder contains everything you’ll need like the Pentaho plugins used by Kaltura analytics and the analytic logs.

Analytics logs can be found at: /opt/kaltura/dwh/logs.  In order to fully understand your analytics problem, open the last hourly analytics log and check if you see any errors.

For the most part Kaltura DWH uses it’s own databases named: kalturadw, kalturadw_bisources, kalturadw_ds.

The Kaltura DWH DB has some “Built in” common issues that we will address shortly.

Common errors and solutions

Locks weren’t released from previous run

In case your machine crashed during analtics or you canceled an analytics process while working, your DWH tables will be locked.

In order to unlock them follow these steps:

  1. Select the locks table database: use kalturadw_ds;
  2. Kaltura Analytics - Locks Table imageCheck if the locks are set: select * from locks;
  3. If you see that the lock_state are set to 1, run this: UPDATE kalturadw_ds.locks set lock_state = 0;

Can’t acquire lock, lock_name is too big

Check your hourly analytics logs under /opt/kaltura/dwh/logs.

if you see this errors:

ERROR 01-07 12:00:09,753 – Register lock.0 – Unexpected error :
ERROR 01-07 12:00:09,753 – Register lock.0 – org.pentaho.di.core.exception.KettleStepException:
Error in step, asking everyone to stop because of:

Error inserting/updating row
Data truncation: Data too long for column ‘lock_name’ at row 1

Then your hourly analytics name is too big for the locks table to handle.

To fix this increase the size of your lock_name field in the locks table.

  1. Select the locks table database: use kalturadw_ds;
  2. Update the lock_name field to a sufficient size: ALTER TABLE locks MODIFY lock_name varchar(100);
  3. Run the hourly analytics again using: ./opt/kaltura/dwh/etlsource/execute/etl_hourly.sh
  4. Continue to increase the field size until you don’t see the error.
  5. If you stopped the hourly process in the middle you’ll need to unlock the tables.

Pentaho plugins are missing

The last common issue is missing Pentaho plugins, you’ll need to see an error like this:

Unable to load class for step/plugin with id [MapperFieldRunner]. Check if the plugin is available in the plugins subdirectory of the Kettle distribution.

All you got to do is copy the plugins located at /opt/kaltura/dwh/penthao-plugins to /usr/local/penthao/pdi/plugins/steps.

you might also need to change the plugins suffix removing the ’32’ or ’42’ digits at the end.

Kaltura CE5 Working Analytics image

Read our follow-up post: wrote

Well, I had enough of analytics debugging for a day, or a month.

Fell free to comment below and write about your “common” analytics issues you encounter.

Hope you’ll succeed in this crazy adventure into the heart of Kaltura analytics.