Kibana: An alias pointing to a closed index disables the UI to create more index patterns when Security is enabled

Created on 18 Jul 2018  Â·  6Comments  Â·  Source: elastic/kibana

Kibana version: 6.3.0 - can reproduce also in earlier versions

Elasticsearch version: 6.3.0

Server OS version: Windows 10

Browser version: Chrome 67.0.3396.99 (Official Build) (64-bit)

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): zip

Describe the bug:
When using security, if we have an alias pointing to closed indices the create index pattern UI gets stuck.

Steps to reproduce:

  1. Start Elasticsearch (with security enabled) and Kibana _Note that I can only reproduce it in a cluster with security enabled; if disabled, I cannot reproduce it._
  2. Create 2 test indices and an alias:
POST test1/test1
{
  "test":"test"
}

POST test2/test1
{
  "test":"test"
}

POST /_aliases
{
    "actions" : [
        { "add" : { "index" : "test1", "alias" : "alias1" } },
        { "add" : { "index" : "test2", "alias" : "alias1" } }
    ]
}
  1. Go to Management --> Index Patterns --> Create Index Patterns
  2. The UI works properly
  3. Close one of the indices:
POST test1/_close
  1. Go to Management --> Index Patterns --> Create Index Patterns - it gets stuck retrieving the indices.

Expected behavior:
Being able to create index patterns

Screenshots (if relevant):
The UI gets stuck in:
stuck_6 3

Errors in browser console (if relevant):
Chrome console shows an unhandled promise rejection error, due to index closed:

vendors.bundle.js:165 INFO: 2018-07-18T08:57:19Z
  Adding connection to http://localhost:5601/elasticsearch


kibana.bundle.js:7 setting active api to [es_5_0]
VM870:1 POST http://localhost:5601/elasticsearch/*/_search 400 (Bad Request)
(anonymous) @ VM870:1
(anonymous) @ vendors.bundle.js:133
sendReq @ vendors.bundle.js:133
serverRequest @ vendors.bundle.js:133
processQueue @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
$digest @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
completeOutstandingRequest @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
setTimeout (async)
Browser.self.defer @ vendors.bundle.js:133
$evalAsync @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
scheduleProcessQueue @ vendors.bundle.js:133
$$resolve @ vendors.bundle.js:133
resolvePromise @ vendors.bundle.js:133
resolveFn @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
forEach @ vendors.bundle.js:133
_resolve @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
requestAnimationFrame (async)
raf @ vendors.bundle.js:133
waitForTick @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
AnimateRunner @ vendors.bundle.js:133
push @ vendors.bundle.js:133
enter @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:159
(anonymous) @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
boundTranscludeFn @ vendors.bundle.js:133
controllersBoundTransclude @ vendors.bundle.js:133
update @ vendors.bundle.js:159
$broadcast @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:159
processQueue @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
$digest @ vendors.bundle.js:133
$apply @ vendors.bundle.js:133
done @ vendors.bundle.js:133
completeRequest @ vendors.bundle.js:133
xhr.onload @ vendors.bundle.js:133
load (async)
(anonymous) @ vendors.bundle.js:133
sendReq @ vendors.bundle.js:133
serverRequest @ vendors.bundle.js:133
processQueue @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
$digest @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
forEach @ vendors.bundle.js:133
fireStateOrUrlChange @ vendors.bundle.js:133
cacheStateAndFireUrlChange @ vendors.bundle.js:133
dispatch @ vendors.bundle.js:128
elemData.handle @ vendors.bundle.js:128
vendors.bundle.js:3 Promise: Detected an unhandled Promise rejection.
[index_closed_exception] closed, with { index_uuid="7rabNZRwS7aXDkxVOiiQFA" & index="test1" } :: {"path":"/*/_search","query":{},"body":"{\"size\":0,\"aggs\":{\"indices\":{\"terms\":{\"field\":\"_index\",\"size\":200}}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"index_closed_exception\",\"reason\":\"closed\",\"index_uuid\":\"7rabNZRwS7aXDkxVOiiQFA\",\"index\":\"test1\"}],\"type\":\"index_closed_exception\",\"reason\":\"closed\",\"index_uuid\":\"7rabNZRwS7aXDkxVOiiQFA\",\"index\":\"test1\"},\"status\":400}"}
vendors.bundle.js:159 Uncaught (in promise) StatusCodeError {status: 400, displayName: "BadRequest", message: "[index_closed_exception] closed, with { index_uuid="7rabNZRwS7aXDkxVOiiQFA" & index="test1" }", path: "/*/_search", query: {…}, …}body: {error: {…}, status: 400}displayName: "BadRequest"message: "[index_closed_exception] closed, with { index_uuid="7rabNZRwS7aXDkxVOiiQFA" & index="test1" }"path: "/*/_search"query: {}response: "{"error":{"root_cause":[{"type":"index_closed_exception","reason":"closed","index_uuid":"7rabNZRwS7aXDkxVOiiQFA","index":"test1"}],"type":"index_closed_exception","reason":"closed","index_uuid":"7rabNZRwS7aXDkxVOiiQFA","index":"test1"},"status":400}"status: 400statusCode: 400toJSON: ƒ ()toString: ƒ ()stack: "Error: [index_closed_exception] closed, with { index_uuid="7rabNZRwS7aXDkxVOiiQFA" & index="test1" }↵    at respond (http://localhost:5601/bundles/vendors.bundle.js:159:38552)↵    at checkRespForFailure (http://localhost:5601/bundles/vendors.bundle.js:159:37792)↵    at http://localhost:5601/bundles/vendors.bundle.js:159:47903↵    at processQueue (http://localhost:5601/bundles/vendors.bundle.js:133:134252)↵    at http://localhost:5601/bundles/vendors.bundle.js:133:135201↵    at Scope.$digest (http://localhost:5601/bundles/vendors.bundle.js:133:146077)↵    at Scope.$apply (http://localhost:5601/bundles/vendors.bundle.js:133:148856)↵    at done (http://localhost:5601/bundles/vendors.bundle.js:133:101124)↵    at completeRequest (http://localhost:5601/bundles/vendors.bundle.js:133:106024)↵    at XMLHttpRequest.xhr.onload (http://localhost:5601/bundles/vendors.bundle.js:133:106783)"__proto__: ErrorAbstract
step @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
Promise.then (async)
step @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
tryCatch @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
prototype.(anonymous function) @ vendors.bundle.js:133
step @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
componentWillMount @ kibana.bundle.js:7
mountClassInstance @ vendors.bundle.js:141
beginWork @ vendors.bundle.js:141
d @ vendors.bundle.js:141
f @ vendors.bundle.js:141
g @ vendors.bundle.js:141
m @ vendors.bundle.js:141
w @ vendors.bundle.js:141
z @ vendors.bundle.js:141
u @ vendors.bundle.js:141
updateContainer @ vendors.bundle.js:141
(anonymous) @ vendors.bundle.js:141
unbatchedUpdates @ vendors.bundle.js:141
Pg @ vendors.bundle.js:141
render @ vendors.bundle.js:149
renderCreateIndexPatternWizard @ kibana.bundle.js:7
(anonymous) @ kibana.bundle.js:7
$digest @ vendors.bundle.js:133
$apply @ vendors.bundle.js:133
done @ vendors.bundle.js:133
completeRequest @ vendors.bundle.js:133
xhr.onload @ vendors.bundle.js:133
load (async)
(anonymous) @ vendors.bundle.js:133
sendReq @ vendors.bundle.js:133
serverRequest @ vendors.bundle.js:133
processQueue @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
$digest @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
(anonymous) @ vendors.bundle.js:133
forEach @ vendors.bundle.js:133
fireStateOrUrlChange @ vendors.bundle.js:133
cacheStateAndFireUrlChange @ vendors.bundle.js:133
dispatch @ vendors.bundle.js:128
elemData.handle @ vendors.bundle.js:128
Kibana Management KibanaApp bug

Most helpful comment

It does appear to be fixed in 6.6.2 but it would be nice if you can confirm that.

All 6 comments

@elastic/kibana-management

Another user has reported this. The cause wasn't clear to them. Perhaps an explanatory message might be added describing the workaround (delete the aliases) in the UI while ES debates how to solve the underlying problem?

It does appear to be fixed in 6.6.2 but it would be nice if you can confirm that.

@bmcconaghy I just experienced this in case 00401676. @TomonoriSoejima mentions that this may be resolved in 6.6.2, but looking here and in https://github.com/elastic/elasticsearch/issues/32238 I wasn't able to find any reference to it officially being patched?

@bmcconaghy following up on my previous message. Would like to confirm this for the customer.

@bmcconaghy Can we get a confirmation on this one. It's getting a bit long in the tooth. Thanks in advance, not sure there's a bunch to do other than confirmation. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pkubat picture pkubat  Â·  75Comments

AlexIoannides picture AlexIoannides  Â·  138Comments

bquartier picture bquartier  Â·  79Comments

JulienPalard picture JulienPalard  Â·  95Comments

passkey1510 picture passkey1510  Â·  96Comments