<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello Thomas,</p>
    <p>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.</p>
    <p>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.</p>
    <p>*sigh*<br>
    </p>
    <p>So it is not a matter of Ubuntu version or remote vs local, but
      of a combination of Koha version, worker and rabbitmq.</p>
    <p>NOW, if I put a "sleep 2" in background_jobs_worker.pl, just
      before the ->find(), then it works.</p>
    <p>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.</p>
    <p><br>
    </p>
    <p>I have a feeling I'm deep into a rabbit (mq) hole, and I'm not
      seeing straight.</p>
    <p><br>
    </p>
    <p>Thanks a lot,<br>
    </p>
    <p><br>
    </p>
    <div class="moz-signature">
      <style type="text/css">
.moz-signature {
 color: #FFFFFF;
}
.sig_inlibro {
 padding-top : 2px;
 color: #888888;
 font-family : "Trebuchet MS", verdana;
 font-size: 90%;
}
.sig_content {
 border-top: 2px solid #DDDDDD;
 border-bottom: 2px solid #BFD13D;
 background-color : #F6F6F6;
 padding-left:10px;
}
.sig_inlibro a:visited, .sig_inlibro a:hover, .sig_inlibro a:link {
 text-decoration: none;
 color: #005B85;
}
.nom {
 color: #005B85;
 font-weight : bold;
}
.inlibro, .in {
 color: #BFD13D;
}
.libro {
 color: #005B85;
}
.in, .libro {
 font-size : 120%;
}
.desc {
    margin-bottom: 0;
    padding-bottom: 5px;
}
.small {
 font-size: 80%;
}
.tagline {
 color : #00BCE4;
}
.sig_footer {
 padding-left : 10px;
 background-color : #EEEFEA;
}
</style>
      <div class="sig_inlibro">
        <div class="sig_content"> <span class="nom">Philippe Blouin,</span><br>
          <span class="tagline small">Directeur de la technologie</span><br>
          <p class="desc small"> Tél.  : (833) 465-4276, poste 230<br>
            <!--
   Tél.  : (888) 604-2627<br/>
--> <a href="mailto:philippe.blouin@inLibro.com"
              class="moz-txt-link-freetext">philippe.blouin@inLibro.com</a>
          </p>
        </div>
        <div class="sig_footer"> <span class="in">in</span><span
            class="libro">Libro</span> <span class="tagline small">|
            pour esprit libre |</span> <a class="small"
            href="http://www.inLibro.com">www.inLibro.com</a> </div>
      </div>
    </div>
    <div class="moz-cite-prefix">On 2022-09-13 16:33, Thomas Klausner
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20220913203332.GM490306@plix.at">
      <pre class="moz-quote-pre" wrap="">Hi!

On Tue, Sep 13, 2022 at 02:58:49PM -0400, Philippe Blouin wrote:
 
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">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.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Is the remote ES exposed via https? Maybe you have slightly different 
Perls or <a class="moz-txt-link-freetext" href="Mozilla::CA">Mozilla::CA</a> 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

</pre>
    </blockquote>
  </body>
</html>