From 1baf15f0f862dcb1757d9a6b454f4c8044c88917 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Mon, 16 Sep 2019 09:58:32 +0100 Subject: [PATCH 1/2] Add temporary logging to help debug _cat/indices 404 This logging is to help debug https://github.com/elastic/elasticsearch/issues/45652 and will be removed once the cause is known. --- .../elasticsearch/rest/action/cat/RestIndicesAction.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java index 5a50b0ff04ce6..80cacd35aaac6 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java @@ -42,6 +42,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.time.DateFormatter; import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.index.IndexNotFoundException; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; @@ -226,6 +227,11 @@ public void onResponse(final Collection responses) { @Override public void onFailure(final Exception e) { + // Temporary logging to help debug https://github.com/elastic/elasticsearch/issues/45652 + // TODO: remove this when we understand why _cat/indices sometimes returns a 404 + if (e instanceof IndexNotFoundException) { + logger.info("_cat/indices returning index_not_found_exception", e); + } listener.onFailure(e); } }, size); From 0fbe042d47846181a6d36884d8d0afcce7dfa272 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Tue, 17 Sep 2019 10:02:11 +0100 Subject: [PATCH 2/2] Change logging to debug and set debug logging for test cluster --- .../org/elasticsearch/rest/action/cat/RestIndicesAction.java | 2 +- x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java index 80cacd35aaac6..24050479be25f 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java @@ -230,7 +230,7 @@ public void onFailure(final Exception e) { // Temporary logging to help debug https://github.com/elastic/elasticsearch/issues/45652 // TODO: remove this when we understand why _cat/indices sometimes returns a 404 if (e instanceof IndexNotFoundException) { - logger.info("_cat/indices returning index_not_found_exception", e); + logger.debug("_cat/indices returning index_not_found_exception", e); } listener.onFailure(e); } diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle index 4c6c8b49fa634..7c7b2018ce7a2 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle @@ -55,6 +55,8 @@ testClusters.integTest { setting 'xpack.security.audit.enabled', 'false' setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.ml.min_disk_space_off_heap', '200mb' + // TODO: remove when the cause of https://github.com/elastic/elasticsearch/issues/45652 is understood + setting 'logger.org.elasticsearch.rest.action.cat', 'DEBUG' keystore 'bootstrap.password', 'x-pack-test-password' keystore 'xpack.security.transport.ssl.secure_key_passphrase', 'testnode'