Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ismael-hasan opened this issue Jul 18, 2018 · 8 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort

Comments

@ismael-hasan
Copy link

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
@ismael-hasan ismael-hasan added the bug Fixes for quality problems that affect the customer experience label Jul 18, 2018
@tylersmalley
Copy link
Contributor

@elastic/kibana-management

@bmcconaghy bmcconaghy self-assigned this Jul 20, 2018
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages and removed :Management DO NOT USE labels Nov 27, 2018
@nerophon
Copy link
Contributor

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?

@TomonoriSoejima
Copy link
Contributor

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

@ryanjok
Copy link

ryanjok commented Nov 8, 2019

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

@ryanjok
Copy link

ryanjok commented Nov 14, 2019

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

@matthiesm
Copy link

@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

@timroes timroes added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppServices and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Jul 22, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jul 22, 2021
@mattkime
Copy link
Contributor

mattkime commented Aug 7, 2021

Tested in 7.14 and works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort
Projects
None yet
Development

No branches or pull requests

10 participants