Islandora-Devops / isle-buildkit

Provides a number of Docker images which can be used to build an Islandora site. See also https://github.com/Islandora-Devops/isle-dc
https://www.islandora.ca/
MIT License
13 stars 23 forks source link

Solr won't index on 3.2.7 #339

Closed joshdentremont closed 3 months ago

joshdentremont commented 3 months ago

After switching to 3.2.7 and pulling in the newest solr configs my solr fails to index. If I roll back to 3.2.4 the index works again.

I updated from 3.2.4 to 3.2.7 and the index worked. I then updated my Drupal modules which gave me search_api_solr 4.3.4. This update told me I needed new configs, so I deleted them and recreated them using the instructions here: https://islandora.github.io/documentation/installation/docker/site-template/updating/#solr

Once I had done that, the index fails with the message "Couldn't index items. Check the logs for details."

If I roll back to buildkit 3.2.4, the index works again. I suspect it's something in the 3.2.6 build, but I can't see what would cause this.

The error message in the logs is huge, but starts like this:

Drupal\search_api_solr\SearchApiSolrException while indexing item entity:node/1420:en: Solr endpoint http://solr:8983/ internal Solr server error (code: 500, body: { "responseHeader":{ "status":500, "QTime":6}, "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","java.nio.file.NoSuchFileException"], "msg":"Server error writing document id 5zb7md-default_solr_index-entity:node/1420:en to the index.", "trace":"org.apache.solr.common.SolrException: Server error writing document id 5zb7md-default_solr_index-entity:node/1420:en to the index.\n\tat org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:318)\n\tat org.apache.solr.update.processor.RunUpdateProcessorFactory$RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:76)\n\tat org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:54)\n\tat org.apache.solr.update.processor.NestedUpdateProcessorFactory$NestedUpdateProcessor.processAdd(NestedUpdateProcessorFactory.java:79)\n\tat org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:54)\n\tat

joshdentremont commented 3 months ago

It seems like the issue might actually be in generating the configs via docker compose exec -T drupal-dev with-contenv bash -lc "for_all_sites create_solr_core_with_default_config"

If I don't build my drupal image from 3.2.7 it keeps generating 4.3.3 solr configs, even though I have 4.3.4 installed. Once I update the drupal image, it will generate the right configs, but then they don't allow me to index with the 3.2.7 solr image.

If I roll back solr to 3.2.4 but leave Drupal at 3.2.7 and generate them, it works ok, and I can then update solr to 3.2.7 again and things seem to work fine.

If I generate them with solr at 3.2.7 it looks like they generate fine (the files are all there), but then indexing fails.

joshdentremont commented 3 months ago

Apparently the issue is that the core was not being recreated. Restarting the solr container between removing the old core and regenerating the new one seems to fix it. I will put in a PR to update the instructions.