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
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
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
I am seeing some of the same errors with Koha 23.05. on koha-elasticsearch index attempt I see Exception 'Koha::Exception' thrown 'Unable to update mappings for index "koha_elastic2_biblios". Reason was: "Validation Failed: 1: mapping type is missing;". Index needs to be recreated and reindexed' Something went wrong rebuilding indexes for koha Not sure about Hugo's setup, but here is what I have when I curl elasticsearch. In my case elasticsearch is on the same server as Koha. { "name" : "koha-node", "cluster_name" : "elasticsearch", "cluster_uuid" : "t8fdCQ9nQz6PIFsEXXQFew", "version" : { "number" : "6.8.23", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "4f67856", "build_date" : "2022-01-06T21:30:50.087716Z", "build_snapshot" : false, "lucene_version" : "7.7.3", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" } let me know if any other info would help with this bug!
Sounds like a networking issue to me, so not a Koha or ES issue. You'll want to double-check your hostname and your /etc/hosts for starters. I know this has been an issue on your systems in the past, Hugo. Then you'll want to double-check your node config in your koha-conf.xml.
(In reply to Hannah Co from comment #3) > Exception 'Koha::Exception' thrown 'Unable to update mappings for index > "koha_elastic2_biblios". Reason was: "Validation Failed: 1: mapping type is > missing;". Index needs to be recreated and reindexed' > Something went wrong rebuilding indexes for koha > > Not sure about Hugo's setup, but here is what I have when I curl > elasticsearch. In my case elasticsearch is on the same server as Koha. > > { > "name" : "koha-node", > "cluster_name" : "elasticsearch", > "cluster_uuid" : "t8fdCQ9nQz6PIFsEXXQFew", > "version" : { > "number" : "6.8.23", > "build_flavor" : "default", > "build_type" : "deb", > "build_hash" : "4f67856", > "build_date" : "2022-01-06T21:30:50.087716Z", > "build_snapshot" : false, > "lucene_version" : "7.7.3", > "minimum_wire_compatibility_version" : "5.6.0", > "minimum_index_compatibility_version" : "5.0.0" > }, > "tagline" : "You Know, for Search" > } > > let me know if any other info would help with this bug! I don't think that Koha supports Elasticsearch 6 anymore. "type" was deprecated and removed in newer versions, which is why Koha doesn't send it as a parameter anymore. You'll need to upgrade your Elasticsearch.
Overall, I'd say these are support issues, but let's leave this ticket open a little while longer...
I think that's the issue: with Koha 23.05 Elasticsearch 6 is no longer supported. An update of Elasticsearch is required: https://wiki.koha-community.org/wiki/System_requirements_and_recommendations
Hm, OK, I see I misread the version numbers - but maybe something got backported that would explain the issues?