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
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | elastic-gei-ip-issue.PNG | 26.74 KB | shashank5563 |
| #4 | elasticsearch_connector-hide-system-indices-3229401.patch | 866 bytes | bsfajardo |
Comments
Comment #2
niknakComment #3
bsfajardo commentedI'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?
Comment #4
bsfajardo commentedHere's a patch that ignores any Elasticsearch system indices (the ones starting with
.) in thehook_views_data()hook implementation. This has solved the issue for me.Comment #5
jienckebd commentedPatch #4 worked here -- thank you!
Comment #6
shashank5563 commented@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} }
Comment #7
renrhafPatch #4 worked for me too ! Thanks !
Comment #8
phpforfree commentedPatch #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.
Comment #9
yookoala commentedJust ran into this issue. #4 patch works for me. Thanks.
Please merge and release this fix as soon as possible.
Comment #10
bluegeek9 commented+1 RTBC
Comment #11
guillaumeduveauThanks for patch #4
Comment #12
perignon commented+1 Works. Mind if we get this committed?
Comment #13
perignon commentedI tested this with alpha4
Comment #14
murrow commentedI too have tested #4 this on alpha4 and it is working fine.
Comment #15
shashank5563 commentedI have tested #4 patch it working.
+1 RTBC
Comment #16
henk commentedI 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"Comment #17
psf_ commentedPatch in #4 works for me.
Drupal: 9.5.8
Elasticsearch: 7.17.6
Comment #18
heddn+1 on RTBC
Comment #19
dubois commented+1 Makes sense to ignore Elasticsearch system indexes from Views.
Comment #20
betarobot commentedPatch in #4 worked for me as well.
Comment #21
fjgarlin commented+1 RTBC. I was running into this, then applied #4 and it all worked again.
Comment #23
sokru commentedThanks all! I committed this even there are plans to deprecate "elasticsearch_connector_views" submodule for 8.0.x.