Problems after upgrading to v14.18.0 (Categories are not displayed)

Hello.

We upgraded our Kaltura CE cluster, from v14.8.0 to v14.18.0.
After upgrading, list of category is not displayed in the KMCng.
When we access the metadata of each entry in the KMCng, category of each media is not displayed.
However, there exists records of categories in Kaltura’s database.

So that, we executed “/opt/kaltura/bin/kaltura-sphinx-reindex.sh”.
The Following error is displayed:

Restarting kaltura-monit (via systemctl):  [  OK  ]
Stopping searchd: Sphinx 2.2.1-id64-dev (r4097)
Copyright (c) 2001-2013, Andrew Aksyonoff
Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/opt/kaltura/app/configurations/sphinx/kaltura.conf'...
stop: successfully sent SIGTERM to pid 5535

Backing up files to /opt/kaltura/sphinx.bck.1556376746. Once the upgrade is done and tested, please remove this directory to save space
Starting searchd: Sphinx 2.2.1-id64-dev (r4097)
Copyright (c) 2001-2013, Andrew Aksyonoff
Copyright (c) 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/opt/kaltura/app/configurations/sphinx/kaltura.conf'...
listening on all interfaces, port=9312
WARNING: index 'kaltura_base': no fields configured (use rt_field directive) - NOT SERVING
WARNING: index 'kaltura_base_gt_in_charset': no fields configured (use rt_field directive) - NOT SERVING
precaching index 'kaltura_entry'
precaching index 'kaltura_category'
precaching index 'kaltura_kuser'
precaching index 'kaltura_category_kuser'
precaching index 'kaltura_cue_point'
precaching index 'kaltura_entry_distribution'
precaching index 'kaltura_caption_item'
precaching index 'kaltura_tag'
precaching index 'kaltura_metadata'
precaching index 'kaltura_schedule_event'
precaching index 'kaltura_entry_vendor_task'
precached 11 indexes in 0.058 sec

Restarting kaltura-monit (via systemctl):  [  OK  ]
PHP Fatal error:  Call to undefined method CaptionAssetItem::getIntId() in /opt/kaltura/app/deployment/base/scripts/populateSphinxCaptionAssetItem.php on line 30
Failed to run /opt/kaltura/app/deployment/base/scripts/populateSphinxCaptionAssetItem.php.
        Please try to run it manually and look at the logs

Therefore, we executed “opt/kaltura/app/deployment/base/scripts/populateSphinxCaptionAssetItem.php”.
The same error was displayed.

Our PHP client program also can not obtain the category list and category ID.

Regards

Hello.

We re-installed packages about the Kaltura CE by using the following command:

# yum reinstall "*kaltura*"

Then, we executed shell scripts for initial settings.
But, this problem was not solved.

We discovered that the cause of this problem is in “/opt/kaltura/app/plugins/content/caption/search/lib/model/CaptionAssetItem.php”.
In old versions, “CaptionAssetItem” class uses “IIndexable” interface.
In current version, this class uses “IBaseObject” interface instead of the “IIndexable”.
But, some functions defined in the “IIndexable” interface are required in order to properly execute “populateSphinxCaptionAssetItem.php”.
So that, we added the functions to the “CaptionAssetItem” class.

The changes of “CaptionAssetItem.php” are shown below.

# diff CaptionAssetItem.php.org CaptionAssetItem.php
16c16
< class CaptionAssetItem extends BaseCaptionAssetItem implements IBaseObject
---
> class CaptionAssetItem extends BaseCaptionAssetItem implements IBaseObject, IIndexable
26a27,30
>
>         public function getIndexObjectName() {
>                 return "CaptionAssetItemIndex";
>         }
49a54,70
>         /* (non-PHPdoc)
>          * @see IIndexable::getIntId()
>          */
>         public function getIntId()
>         {
>                 return $this->getId();
>         }
>
>         /* (non-PHPdoc)
>          * @see IIndexable::indexToSearchIndex()
>          */
>         public function indexToSearchIndex()
>         {
>                 kEventsManager::raiseEventDeferred(new kObjectReadyForIndexEvent($this));
>         }
>
>
150a172,179
>
>         /* (non-PHPdoc)
>          * @see IIndexable::setUpdatedAt()
>          */
>         public function setUpdatedAt($time)
>         {
>                 return $this; // updates nothing
>         }

After this correction, the KMCng displays category list.
And, category of each media entry was displayed in the metadata window.
Our PHP client program also can obtain the category list and category ID.

I don’t know why the required interface was removed.
However, we are glad we could solve this problem.

Regards

Hello.

This problem occurred in a cluster environment.
However, this problem did not occur on all-in-one server.
Therefore, I think this problem only occurs in cluster environments.

Regards

Hello,
I think you might have a wrong sphinx setup in one or some of your nodes. Start by checking your db.ini files and make sure that they point to the same server.

Regards,

David

Hello, @david.eusse,

Thank you for your advice.

I checked the parameters in each server’s “db.ini” before fixing the PHP script.
The “sphinx1.connection.dsn” and the “sphinx2.connection.dsn” have been set to appropriate values ​​on all servers.
I guess that errors in class inheritance or interface implementation do not occur, if parameters such as “db.ini” are the cause.

Regards

Hi @t-saito,

I also upgraded a cluster environment and it works fine. However I don’t have captions, so it might be that issue.

Regards,

Hello, @david.eusse,

Thank you for your report.

We solved this problem by modifying source code of the “CaptionAssetItem” class.
Before modifying this script, an error occurred in “populateSphinxCaptionAssetItem.php”.
This error prevented rebuilding of indexes in the Sphinx.
If you are facing problems about caption, you may be able to solve it in a similar way.

Currently, I guess as follows.
Necessary PHP script may not be installed on Sphinx node.
Or, in the Sphinx node, reference path of PHP scripts may not be set correctly.

Regards,

Hello @t-saito,

Did you verify that /opt/kaltura/app/configurations/sphinx/kaltura.conf.template and /opt/kaltura/app/configurations/sphinx/kaltura.conf on all the Sphinx nodes is the same and that it matches the file in https://github.com/kaltura/server as it is in the branch you’re currently running? Also, is it possible that you have a searchd proc that’s a zombie? In such a case, an attempt to restart the daemon will fail, which would result in the behaviour you’ve described…

Hello @jess,

Thank you for your advice.

I verified that “kaltura.conf.template” on all sphinx nodes is the same and that it matches the file in the Github.
And, I also verified that “kaltura.conf” on all sphinx nodes is the same.
There were no zombie processes in any sphinx node.

Regards,