Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Avoid closed_index_exception when calling _stats #372

Open
luzili opened this issue Aug 17, 2016 · 1 comment
Open

Avoid closed_index_exception when calling _stats #372

luzili opened this issue Aug 17, 2016 · 1 comment

Comments

@luzili
Copy link

luzili commented Aug 17, 2016

As far as i understood calling _stats on elasticsearch can provoke a "index_closed_exception" if using wildcard-aliases that expand to closed indexes. (elastic/elasticsearch#15744)

Adding the "ignore_unavailable=true" option avoids that. Would it make sense to add this to the line

host + '/' + encode(index) + '/_stats?level=shards&human',

in _site/dist/kopf.js ? (this resolves the problem on my current elastic cluster with kopf)

(i'm getting:

[2016-08-17 19:11:16] {"data":{"error":{"root_cause":[{"type":"index_closed_exception","reason":"closed","index":"prod-2016.06.07"}],"type":"index_closed_exception","reason":"closed","index":"prod-2016.06.07"},"status":403},"status":403,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"url":"http://localhost:9200/_stats/docs,store","headers":{"Accept":"application/json, text/plain, /"}},"statusText":"Forbidden"}

)

@lmenezes
Copy link
Owner

@luzili hum, good point. I never actually ran into this issue. will fix this and create a new release :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants