Sphinx servers: indexes not aligned between 2 servers

Hello,

I configured my kaltura CE 11.7 installation with 2 Sphinx server (included in Frontends), but I found several times that the sphinx servers are not aligned from the indexes point of view.
so, calling the api I obtain different results depending from the sphinx server and this is a problem because I obtain wrong results (total videos, video search, etc…).

I tried to run a re-index script (kaltura-sphinx-reindex.sh) several times, but the indexes between the 2 sphinx servers are different, after a few api operations.

In Kaltlog I have not found any issues about sphinxs :frowning:

anyone knows how can I check the sphinx configuration in order to be sure that the sphinx is configured with distributed indexes?

Hi AML,

Here is how it works:
on each batch and front node, you have:
/opt/kaltura/app/configurations/db.ini
The parts relevant to Sphinx are:

[sphinx_datasources]
datasources.0 = sphinx1
datasources.1 = sphinx2

Which later in the file are mapped to:

sphinx1.adapter = mysql
sphinx1.connection.dsn = "mysql:host=mysphinx0;port=9312;"

sphinx2.adapter = mysql
sphinx2.connection.dsn = "mysql:host=mysphinx1;port=9312;"

On each Sphinx node, you should have the kaltura-populate daemon running, which is started with:
#/etc/init.d/kaltura-populate start

This daemon writes a log to /opt/kaltura/log/kaltura_populate.log
its job is to make sure Sphinx is always synchronized with the operational DB [MySQL].

The load balancing between Sphinx instances is done at the application level. If one is unresponsive, the app will not route requests to it.

Hope this helps,

1 Like

Hi @amletoguerra,

I experienced the same problem and it turned up kaltura-sphinx-config.sh set up both Sphinx servers with the same sphinxServer value in /opt/kaltura/app/configurations/sphinx/populate/populate.conf’ and ini file there.

This leads to both Sphinxes using the same entry in kaltura_sphinx_log.sphinx_log_server in the MySQL database.

Just make sure each server has its own IP as sphinxServer value and reindex everything with kaltura-sphinx-reindex.sh

Waldemar

1 Like

FYI - this is fixed here:

Thanks,

1 Like

thanks @wzurowski and @jess :grin: