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.

5 thoughts on “Kaltura CE5 Analytics

  1. Pingback: Fixing Kaltura CE5 | ronileco.com blog | Ronileco

  2. Pingback: Fixing Kaltura CE5 analytics (Continued) - Panda OS Consulting and Development Panda OS Consulting and Development

  3. hello, I need help with this error from etl_daily*.log:

    INFO 27-02 12:59:05,505 – Set Variables.0 – Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    INFO 27-02 12:59:05,624 – execute kjb file – Starting entry [Write To Log – start job]
    INFO 27-02 12:59:05,625 –
    Status
    – Executing create_partitions.kjb
    Etl base path: /opt/kaltura/dwh/etlsource/
    Writing to log [/opt/kaltura/dwh/logs/log_create_partitions]

    INFO 27-02 12:59:05,625 – execute kjb file – Starting entry [Run kjbVar job]
    INFO 27-02 12:59:05,810 – perform retention policy – Starting entry [Move old partitions to archive]
    ERROR 27-02 12:59:06,409 – Move old partitions to archive – An error occurred executing this job entry :
    Couldn’t execute SQL: CALL move_innodb_to_archive()

    Cannot remove all partitions, use DROP TABLE instead

    INFO 27-02 12:59:06,410 – perform retention policy – Finished job entry [Move old partitions to archive] (result=[false])
    INFO 27-02 12:59:06,432 – execute kjb file – Starting entry [Write To Log on error]
    INFO 27-02 12:59:06,432 –
    Status
    – Failed create_partitions.kjb

    INFO 27-02 12:59:06,433 – execute kjb file – Starting entry [Abort job 1]
    ERROR 27-02 12:59:06,434 – Abort job 1 – Aborting job.
    INFO 27-02 12:59:06,434 – execute kjb file – Finished job entry [Abort job 1] (result=[false])
    INFO 27-02 12:59:06,434 – execute kjb file – Finished job entry [Write To Log on error] (result=[false])
    INFO 27-02 12:59:06,434 – execute kjb file – Finished job entry [Run kjbVar job] (result=[false])
    INFO 27-02 12:59:06,434 – execute kjb file – Finished job entry [Write To Log – start job] (result=[false])
    INFO 27-02 12:59:06,435 – execute kjb file – Finished job entry [set kjb and log path into vars] (result=[false])
    INFO 27-02 12:59:06,435 – Sequence executioner – Finished job entry [execute kettle-job file] (result=[false])
    INFO 27-02 12:59:06,435 – Sequence executioner – Finished job entry [get jobs] (result=[false])
    INFO 27-02 12:59:06,436 – daily – Starting entry [Release daily lock]
    INFO 27-02 12:59:06,437 – Release daily lock – Loading transformation from XML file [/opt/kaltura/dwh/etlsource//common/release_lock_by_name.ktr]
    INFO 27-02 12:59:06,465 – release_lock_by_name – Dispatching started for transformation [release_lock_by_name]
    INFO 27-02 12:59:06,467 – release_lock_by_name – This transformation can be replayed with replay date: 2015/02/27 12:59:06
    INFO 27-02 12:59:06,500 – [release_lock_by_name].[Get lock name].get_daily_lock_name – Dispatching started for transformation [get_daily_lock_name]

    1. Hi Peter,
      I would highly recommend installing or upgrading to the new Kaltura CE9 / 10.
      Kaltura CE5 is no longer supported and to benefit from all the latest features we recommend that you upgrade it.
      If you need our services you are more than welcome to contact us.

      1. Thanks for info. I cant find any further information about Kaltura CE9/10. Can you send me link or some specification, how to upgrade Kaltura from CE5 to CE 9/10. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *