diff --git a/.buildkite/linux_jdk_matrix_pipeline.yml b/.buildkite/linux_jdk_matrix_pipeline.yml index eb42bd5ee..65d80d6b4 100644 --- a/.buildkite/linux_jdk_matrix_pipeline.yml +++ b/.buildkite/linux_jdk_matrix_pipeline.yml @@ -60,20 +60,14 @@ steps: value: "adoptiumjdk_21" - label: "Adoptium JDK 17 (Eclipse Temurin)" value: "adoptiumjdk_17" - - label: "Adoptium JDK 11 (Eclipse Temurin)" - value: "adoptiumjdk_11" - label: "OpenJDK 21" value: "openjdk_21" - label: "OpenJDK 17" value: "openjdk_17" - - label: "OpenJDK 11" - value: "openjdk_11" - label: "Zulu 21" value: "zulu_21" - label: "Zulu 17" value: "zulu_17" - - label: "Zulu 11" - value: "zulu_11" - wait: ~ if: build.source != "schedule" && build.source != "trigger_job" diff --git a/.buildkite/windows_jdk_matrix_pipeline.yml b/.buildkite/windows_jdk_matrix_pipeline.yml index 2c336e141..a54e7eca5 100644 --- a/.buildkite/windows_jdk_matrix_pipeline.yml +++ b/.buildkite/windows_jdk_matrix_pipeline.yml @@ -33,20 +33,14 @@ steps: value: "adoptiumjdk_21" - label: "Adoptium JDK 17 (Eclipse Temurin)" value: "adoptiumjdk_17" - - label: "Adoptium JDK 11 (Eclipse Temurin)" - value: "adoptiumjdk_11" - label: "OpenJDK 21" value: "openjdk_21" - label: "OpenJDK 17" value: "openjdk_17" - - label: "OpenJDK 11" - value: "openjdk_11" - label: "Zulu 21" value: "zulu_21" - label: "Zulu 17" value: "zulu_17" - - label: "Zulu 11" - value: "zulu_11" - wait: ~ if: build.source != "schedule" && build.source != "trigger_job" diff --git a/config/jvm.options b/config/jvm.options index b729fce91..f84e904ce 100644 --- a/config/jvm.options +++ b/config/jvm.options @@ -16,10 +16,6 @@ ## ################################################################ -## GC configuration -11-13:-XX:+UseConcMarkSweepGC -11-13:-XX:CMSInitiatingOccupancyFraction=75 -11-13:-XX:+UseCMSInitiatingOccupancyOnly ## Locale # Set the locale language @@ -59,11 +55,7 @@ #-XX:HeapDumpPath=${LOGSTASH_HOME}/heapdump.hprof ## GC logging -#-Xlog:gc*,gc+age=trace,safepoint:file=@loggc@:utctime,pid,tags:filecount=32,filesize=64m - -# log GC status to a file with time stamps -# ensure the directory exists -#-Xloggc:${LS_GC_LOG_FILE} +#-Xlog:gc*,gc+age=trace,safepoint:file=${LS_GC_LOG_FILE}:utctime,pid,tags:filecount=32,filesize=64m # Entropy source for randomness -Djava.security.egd=file:/dev/urandom diff --git a/docs/static/jvm.asciidoc b/docs/static/jvm.asciidoc index 88765d907..51d735b55 100644 --- a/docs/static/jvm.asciidoc +++ b/docs/static/jvm.asciidoc @@ -4,8 +4,8 @@ {ls} requires one of these versions: -* Java 11 * Java 17 (default). Check out <> for settings info. +* Java 21 Use the http://www.oracle.com/technetwork/java/javase/downloads/index.html[official @@ -17,13 +17,13 @@ for the official word on supported versions across releases. [[bundled-jdk]] .Bundled JDK [NOTE] -===== +===== {ls} offers architecture-specific https://www.elastic.co/downloads/logstash[downloads] that include -Adoptium Eclipse Temurin 17, the latest long term support (LTS) release of the JDK. +Adoptium Eclipse Temurin 17, a long term support (LTS) release of the JDK. Use the LS_JAVA_HOME environment variable if you want to use a JDK other than the -version that is bundled. +version that is bundled. If you have the LS_JAVA_HOME environment variable set to use a custom JDK, Logstash will continue to use the JDK version you have specified, even after you upgrade. ===== @@ -40,9 +40,9 @@ On systems with Java installed, this command produces output similar to the foll [source,shell] ----- -java version "11.0.1" 2018-10-16 LTS -Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) -Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode) +openjdk version "17.0.12" 2024-07-16 +OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7) +OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode) ----- [float] diff --git a/docs/static/running-logstash-windows.asciidoc b/docs/static/running-logstash-windows.asciidoc index 7a3819c58..36a98233e 100644 --- a/docs/static/running-logstash-windows.asciidoc +++ b/docs/static/running-logstash-windows.asciidoc @@ -46,8 +46,6 @@ Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode) ----- -NOTE: As of the publication of this document, please review this https://github.com/elastic/logstash/issues/10496[known issue that impacts Java 11] before proceeding. - Once you have <> and validated JVM pre-requisites, you may proceed. NOTE: For the examples listed below, we are running Windows Server 2016, Java 11.0.3, diff --git a/logstash-core/lib/logstash/runner.rb b/logstash-core/lib/logstash/runner.rb index 876d3e1e1..bdd66cbfd 100644 --- a/logstash-core/lib/logstash/runner.rb +++ b/logstash-core/lib/logstash/runner.rb @@ -318,10 +318,7 @@ class LogStash::Runner < Clamp::StrictCommand deprecation_logger.deprecated msg end - if JavaVersion::CURRENT < JavaVersion::JAVA_11 - logger.warn I18n.t("logstash.runner.java.version", - :java_home => java.lang.System.getProperty("java.home")) - elsif JavaVersion::CURRENT < JavaVersion::JAVA_17 + if JavaVersion::CURRENT < JavaVersion::JAVA_17 deprecation_logger.deprecated I18n.t("logstash.runner.java.version_17_minimum", :java_home => java.lang.System.getProperty("java.home")) end diff --git a/logstash-core/locales/en.yml b/logstash-core/locales/en.yml index 92dcb38ee..10d7a8822 100644 --- a/logstash-core/locales/en.yml +++ b/logstash-core/locales/en.yml @@ -440,14 +440,8 @@ en: Running Logstash with the bundled JDK is recommended. The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability. If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), you can configure LS_JAVA_HOME to use that version instead. - version: >- - Starting from Logstash 8.0, the minimum required version of Java is Java 11; your Java version from - %{java_home} does not meet this requirement. Please reconfigure your version of Java to one that is supported. - Running Logstash with the bundled JDK is recommended. - The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability. - If you have compelling reasons for using your own JDK (organizational-specific compliance requirements, for example), you can configure LS_JAVA_HOME to use that version instead. version_17_minimum: >- - Starting from Logstash 9.0, the minimum required version of Java will be Java 17; + Starting from Logstash 9.0, the minimum required version of Java is Java 17; your Java version from `%{java_home}` does not meet this requirement. Running Logstash with the bundled JDK is recommended. The bundled JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability. diff --git a/logstash-core/src/main/java/org/logstash/util/JavaVersion.java b/logstash-core/src/main/java/org/logstash/util/JavaVersion.java index 505e27e67..c1d619e98 100644 --- a/logstash-core/src/main/java/org/logstash/util/JavaVersion.java +++ b/logstash-core/src/main/java/org/logstash/util/JavaVersion.java @@ -30,7 +30,6 @@ import java.util.Objects; public class JavaVersion implements Comparable { public static final JavaVersion CURRENT = parse(System.getProperty("java.specification.version")); - public static final JavaVersion JAVA_11 = parse("11"); public static final JavaVersion JAVA_17 = parse("17"); private final List version; diff --git a/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JavaVersion.java b/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JavaVersion.java index 0e4d0cf51..7aa3f484d 100644 --- a/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JavaVersion.java +++ b/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JavaVersion.java @@ -30,10 +30,10 @@ import java.util.Objects; public class JavaVersion implements Comparable { public static final JavaVersion CURRENT = parse(System.getProperty("java.specification.version")); - public static final JavaVersion JAVA_11 = parse("11"); + public static final JavaVersion JAVA_17 = parse("17"); private final List version; - private JavaVersion(List version){ + private JavaVersion(List version) { this.version = version; } diff --git a/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JvmOptionsParser.java b/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JvmOptionsParser.java index 84799da1c..d19b5f547 100644 --- a/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JvmOptionsParser.java +++ b/tools/jvm-options-parser/src/main/java/org/logstash/launchers/JvmOptionsParser.java @@ -114,11 +114,11 @@ public class JvmOptionsParser { handleJvmOptions(args, System.getenv("LS_JAVA_OPTS")); } - static void bailOnOldJava(){ - if (JavaVersion.CURRENT.compareTo(JavaVersion.JAVA_11) < 0) { + static void bailOnOldJava() { + if (JavaVersion.CURRENT.compareTo(JavaVersion.JAVA_17) < 0) { final String message = String.format( Locale.ROOT, - "The minimum required Java version is 11; your Java version from [%s] does not meet this requirement", + "The minimum required Java version is 17; your Java version from [%s] does not meet this requirement", System.getProperty("java.home") ); System.err.println(message);