Bug 31504 - ElasticSearch No indexing new records after upgrade
Summary: ElasticSearch No indexing new records after upgrade
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-01 12:36 UTC by Hugo Agud
Modified: 2022-09-12 12:17 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Agud 2022-09-01 12:36:55 UTC
After upgrading koha 21.11 to 22.05 ElasticSearch is not able to index new records.

At webadmin we can see the warning

'Index 'koha_xxxxxx' needs to be recreated.'

Executing 'Reset mapping' button doesn't fix the error...


when trying to full reindex with option -d or -r it doesn't work

admin@___21:~$ sudo koha-elasticsearch --rebuild -d ___

sudo: unable to resolve host ___21: Name or service not known

sudo: unable to resolve host ___21: Name or service not known

Use of uninitialized value $reason in concatenation (.) or string at /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch/Indexer.pm line 283.

Exception 'Koha::Exception' thrown 'Unable to update mappings for index "koha_____biblios". Reason was: "". Index needs to be recreated and reindexed'

Something went wrong rebuilding indexes for ___

Removing the index directly at ElasticSearch doesn't works

* ElasticSearch is not localhost
Comment 1 Nick Clemens (kidclamp) 2022-09-12 12:06:09 UTC
Can you share the ES config, with the instance name replaced, rather than removed?

The issue seems to be that ES cannot be reached, can you curl the host? that should get you the standard es 'you know, for search' response

(In reply to Hugo Agud from comment #0)
> After upgrading koha 21.11 to 22.05 ElasticSearch is not able to index new
> records.
> 
> At webadmin we can see the warning
> 
> 'Index 'koha_xxxxxx' needs to be recreated.'
> 
> Executing 'Reset mapping' button doesn't fix the error...
> when trying to full reindex with option -d or -r it doesn't work
> 
> admin@___21:~$ sudo koha-elasticsearch --rebuild -d ___
> 
> sudo: unable to resolve host ___21: Name or service not known
> 
> sudo: unable to resolve host ___21: Name or service not known
> 
> Use of uninitialized value $reason in concatenation (.) or string at
> /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch/Indexer.pm line 283.
> 
> Exception 'Koha::Exception' thrown 'Unable to update mappings for index
> "koha_____biblios". Reason was: "". Index needs to be recreated and
> reindexed'
> 
> Something went wrong rebuilding indexes for ___
> 
> Removing the index directly at ElasticSearch doesn't works
> 
> * ElasticSearch is not localhost
Comment 2 Hugo Agud 2022-09-12 12:17:46 UTC
Hi

It is not an ES issue, it is a koha issue, I am pretty sure (and it has been appeared just with 22.05 not previous upgrades)


I have checked this koha with many ES Servers (new and previous working ES v6.*), I have checked with working ES, with same results.

I saw this error in the very beginng of testing koha, and it was an url (I can't remmeber that via url and 'I know what I am doing') you can delete index.

Exception 'Koha::Exception' thrown 'Unable to update mappings for index "koha__demo1_biblios". Reason was: "". Index needs to be recreated and reindexed'


It is something that can't be overwritten in koha that makes it crash