Problem/Motivation

I try to set up an connection from Drupal 9.2 with Elasticsearch (V7.14), but after insert the information for the cluster, I create the index from Search API and when I add a field, that break the Drupal.

The error found is:
NOTICE: PHP message: Uncaught PHP Exception Elasticsearch\Common\Exceptions\BadRequest400Exception: "{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Indices [.geoip_databases] use and access is reserved for system operations"}],"type":"illegal_argument_exception","reason":"Indices [.geoip_databases] use and access is reserved for system operations"},"status":400}" at /app/drupal/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php line 675

In Elasticsearch interface, (I use Elastic Cloud), I try to disable geoip with this code below, but that change nothing

PUT _cluster/settings
{
"persistent": {
"ingest.geoip.downloader.enabled": false
}
}

I suppose the real issue is not directly inside the module but have you any solution for me ?

Thanks

Comments

niknak created an issue. See original summary.

niknak’s picture

Version: 8.x-7.x-dev » 8.x-7.0-alpha3
bsfajardo’s picture

I'm having the same issue. Site was working fine as of a few weeks ago, based on the same Elasticsearch version: 7.14.
But today, after clearing Drupal's cache, I'm getting this same error.

It seems to be related to this issue: https://github.com/elastic/elasticsearch/issues/74687
I can see that this issue has been resolved and merged on July 2021, but as far as I know 7.14 is the latest stable version... so, I'm not sure if this has been fixed already.

Has anyone tried Elasticsearch 8.x?

bsfajardo’s picture

Here's a patch that ignores any Elasticsearch system indices (the ones starting with .) in the hook_views_data() hook implementation. This has solved the issue for me.

jienckebd’s picture

Patch #4 worked here -- thank you!

shashank5563’s picture

StatusFileSize
new26.74 KB

@niknak, You can also do it from the Elasticsearch from the console using the following commands.

Step 1: You need to login on to the server via the ssh

Step 2: Enable the geoip : curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d' { "persistent" : { "ingest.geoip.downloader.enabled": true } } '

Step 3: Stop and Start the server :

systemctl stop elasticsearch.service
systemctl start elasticsearch.service

Step 4: Check the logs and disable the geoip :

tail -f /var/log/elasticsearch/elasticsearch.log

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d' { "persistent" : { "ingest.geoip.downloader.enabled": false} }

renrhaf’s picture

Status: Active » Reviewed & tested by the community

Patch #4 worked for me too ! Thanks !

phpforfree’s picture

Patch #4 worked for me too. Thanks!

Running Drupal 9.3 with Elasticsearch (v7.17). This bug gave me the dreaded WSOD with "The website has encountered an unexpected error". Hopefully it will be accepted soon and a new release to the module rolled out.

yookoala’s picture

Just ran into this issue. #4 patch works for me. Thanks.

Please merge and release this fix as soon as possible.

bluegeek9’s picture

+1 RTBC

guillaumeduveau’s picture

Thanks for patch #4

perignon’s picture

+1 Works. Mind if we get this committed?

perignon’s picture

Version: 8.x-7.0-alpha3 » 8.x-7.0-alpha4

I tested this with alpha4

murrow’s picture

I too have tested #4 this on alpha4 and it is working fine.

shashank5563’s picture

I have tested #4 patch it working.

+1 RTBC

henk’s picture

I had the same issue after upgrade. If you are not using geoip, best solution is to turn it off in ElasticSearch "ingest.geoip.downloader.enabled": false"

psf_’s picture

Patch in #4 works for me.

Drupal: 9.5.8
Elasticsearch: 7.17.6

heddn’s picture

+1 on RTBC

dubois’s picture

+1 Makes sense to ignore Elasticsearch system indexes from Views.

betarobot’s picture

Patch in #4 worked for me as well.

fjgarlin’s picture

+1 RTBC. I was running into this, then applied #4 and it all worked again.

  • sokru committed 56d11f71 on 8.x-7.x
    Issue #3229401 by bsfajardo, niknak: Indices [.geoip_databases] use and...
sokru’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all! I committed this even there are plans to deprecate "elasticsearch_connector_views" submodule for 8.0.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.