From 599ae091530c65d1f76025245958dcaf410a62c4 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sun, 18 Mar 2018 09:36:10 -0400 Subject: [PATCH 1/3] Configure error file for archive packages This is a follow up to a previous change which set the error file path for the package distributions. The observation here is that we always set the working directory of Elasticsearch to the root of the installation (i.e., Elasticsearch home). Therefore, we can specify the error file path relative to this directory and default it to the logs directory, similar to the package distributions. --- distribution/build.gradle | 2 +- .../important-settings/error-file.asciidoc | 22 ++++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index f3fe27168f70e..45500673f9353 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -268,7 +268,7 @@ subprojects { 'error.file': [ 'deb': "-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log", 'rpm': "-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log", - 'def': "#-XX:ErrorFile=/error/file/path" + 'def': "-XX:ErrorFile=logs/hs_err_pid%p.log" ], 'stopping.timeout': [ diff --git a/docs/reference/setup/important-settings/error-file.asciidoc b/docs/reference/setup/important-settings/error-file.asciidoc index 37f1d2a0b14ed..9cfd50cce13f1 100644 --- a/docs/reference/setup/important-settings/error-file.asciidoc +++ b/docs/reference/setup/important-settings/error-file.asciidoc @@ -1,16 +1,12 @@ [[error-file-path]] === JVM fatal error logs -The <> and <> package distributions default to configuring -the JVM to write fatal error logs to `/var/lib/elasticsearch`; these are logs -produced by the JVM when it encounters a fatal error (e.g., a segmentation -fault). If this path is not suitable for receiving logs, you should modify the -entry `-XX:ErrorFile=/var/lib/elasticsearch/hs_err_pid%p.log` in -<> to an alternate path. - -Note that the archive distributions do not configure the error file path by -default. Instead, the JVM will default to writing to the working directory for -the Elasticsearch process. If you wish to configure an error file path, you -should modify the entry `#-XX:ErrorFile=/error/file/path` in -<> to remove the comment marker `#` and to specify an -actual path. +By default, Elasticsearch configures the JVM to write fatal error logs +to the default logging directory (this is `/var/lib/elasticsearch` for +the <> and <> package distributions, and the `logs` +directory under the root of the Elasticsearch installation for the +<> archive distributions. These are logs produced +by the JVM when it encounters a fatal error (e.g., a segmentation +fault). If this path is not suitable for receiving logs, you should +modify the entry `-XX:ErrorFile=/var/lib/elasticsearch/hs_err_pid%p.log` +in <> to an alternate path. From 8b29a5aa5986c64790c02290d4b9fce8855a93f1 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sun, 18 Mar 2018 10:03:31 -0400 Subject: [PATCH 2/3] Reword docs --- .../setup/important-settings/error-file.asciidoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/setup/important-settings/error-file.asciidoc b/docs/reference/setup/important-settings/error-file.asciidoc index 9cfd50cce13f1..c11eed0bb3a12 100644 --- a/docs/reference/setup/important-settings/error-file.asciidoc +++ b/docs/reference/setup/important-settings/error-file.asciidoc @@ -5,8 +5,8 @@ By default, Elasticsearch configures the JVM to write fatal error logs to the default logging directory (this is `/var/lib/elasticsearch` for the <> and <> package distributions, and the `logs` directory under the root of the Elasticsearch installation for the -<> archive distributions. These are logs produced -by the JVM when it encounters a fatal error (e.g., a segmentation -fault). If this path is not suitable for receiving logs, you should -modify the entry `-XX:ErrorFile=/var/lib/elasticsearch/hs_err_pid%p.log` -in <> to an alternate path. +<> archive distributions). These are logs +produced by the JVM when it encounters a fatal error (e.g., a +segmentation fault). If this path is not suitable for receiving logs, +you should modify the entry `-XX:ErrorFile=...` in +<> to an alternate path. From 0873873f241113ccae5b75fe6796239acd6b3e9c Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sun, 18 Mar 2018 10:42:06 -0400 Subject: [PATCH 3/3] Fix directory --- docs/reference/setup/important-settings/error-file.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/setup/important-settings/error-file.asciidoc b/docs/reference/setup/important-settings/error-file.asciidoc index c11eed0bb3a12..d58a752ac28fa 100644 --- a/docs/reference/setup/important-settings/error-file.asciidoc +++ b/docs/reference/setup/important-settings/error-file.asciidoc @@ -2,7 +2,7 @@ === JVM fatal error logs By default, Elasticsearch configures the JVM to write fatal error logs -to the default logging directory (this is `/var/lib/elasticsearch` for +to the default logging directory (this is `/var/log/elasticsearch` for the <> and <> package distributions, and the `logs` directory under the root of the Elasticsearch installation for the <> archive distributions). These are logs