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:
POST test1/test1
{
"test":"test"
}
POST test2/test1
{
"test":"test"
}
POST /_aliases
{
"actions" : [
{ "add" : { "index" : "test1", "alias" : "alias1" } },
{ "add" : { "index" : "test2", "alias" : "alias1" } }
]
}
Management --> Index Patterns --> Create Index Patterns POST test1/_close
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:

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
@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
Most helpful comment
It does appear to be fixed in 6.6.2 but it would be nice if you can confirm that.