[Koha-devel] Elasticsearch not auto-updating after cataloguing

Philippe Blouin philippe.blouin at inlibro.com
Fri Sep 16 22:01:02 CEST 2022


Hello Thomas,

I followed your tip the last few days.  At this point I've spotted which 
commit between 21 and 22 moved the reindexing to BackgroundJobs, and 
when set up correctly (the worker), it does reindex indeed.

But if rabbitmq runs, then it fails.   The background_jobs service gets 
the clue to look for job X: if connecte to MQ, it goes to the database 
with a ->find()... and gets nothing.  If MQ is not running, it goes to 
the database with a ->search() and process the jobs there with success.

*sigh*

So it is not a matter of Ubuntu version or remote vs local, but of a 
combination of Koha version, worker and rabbitmq.

NOW, if I put a "sleep 2" in background_jobs_worker.pl, just before the 
->find(), then it works.

Like if the Queue is faster than the Database ??!?!  Seems to me nothing 
is put onto the queue, especially not an ID, without the database entry 
being completed.


I have a feeling I'm deep into a rabbit (mq) hole, and I'm not seeing 
straight.


Thanks a lot,


Philippe Blouin,
Directeur de la technologie

Tél.  : (833) 465-4276, poste 230
philippe.blouin at inLibro.com

inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
On 2022-09-13 16:33, Thomas Klausner wrote:
> Hi!
>
> On Tue, Sep 13, 2022 at 02:58:49PM -0400, Philippe Blouin wrote:
>   
>> Depends on the installation, but where background_jobs_worker.pl runs or not
>> makes not difference in where the cataloguing->indexing path works.
>>
>> It seems to always work when Koha runs on the same machine as ES, and not
>> otherwise.
> Is the remote ES exposed via https? Maybe you have slightly different
> Perls orMozilla::CA  installation? Any errors in the logs?
>
> Which Koha Verion are you running? Are you sure both latpop and server
> run the same version?
>
> In the source code there is a param 'skip_record_index', which will
> prevent the immediate indexing after an edit (if I've skimmed the code
> correctly). Maybe that is set? Though I don't know when it would be set
> (by whom..)
>
> Greetings,
> domm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220916/b9c705eb/attachment.htm>


More information about the Koha-devel mailing list