elasticsearch-prometheus-exporter icon indicating copy to clipboard operation
elasticsearch-prometheus-exporter copied to clipboard

Cluster state request failed after upgrade to ES 8.15.1

Open Philippus opened this issue 1 year ago • 5 comments

We are getting the error below after upgrading from Elasticsearch 8.14.3 to 8.15.1:

{
  "error": {
    "root_cause": [
      {
        "type": "exception",
        "reason": "Cluster state request failed"
      }
    ],
    "type": "exception",
    "reason": "Cluster state request failed",
    "caused_by": {
      "type": "array_index_out_of_bounds_exception",
      "reason": "Index 0 out of bounds for length 0"
    }
  },
  "status": 500
}

Philippus avatar Sep 12 '24 14:09 Philippus

need to look into this, tests have passed so the issue is perhaps some new state ES added. 🤦🏻‍♂️

mindw avatar Sep 15 '24 08:09 mindw

Not sure yet, but we think it could be an issue that was fixed in https://github.com/elastic/elasticsearch/pull/112720. Because we also don't get any stats on a GET _nodes/stats call.

Philippus avatar Sep 16 '24 08:09 Philippus

@Philippus thanks for digging into this - sure saved a lot of digging!

Guess the fix is 8.15.2 - I'll try to get a release as soon as its available.

mindw avatar Sep 16 '24 08:09 mindw

8.15.2 indeed fixes the issue with the _nodes/stats call.

Philippus avatar Sep 27 '24 07:09 Philippus

@Philippus plugin version 8.15.2.0 was release - can you please verify it solves this issue?

mindw avatar Sep 27 '24 08:09 mindw

I think this can be closed, I'm 99% this issue is solved. However, we have migrated our setup to use https://github.com/prometheus-community/elasticsearch_exporter ourselves, so I'm unable to verify.

Philippus avatar Nov 20 '24 19:11 Philippus

@Philippus thank you for the update. Given the pain ES plugins are, your decision to migrate makes a lot of sense. https://github.com/vinted/elasticsearch-exporter-rs is another alternative.

mindw avatar Dec 07 '24 08:12 mindw