Differences between revisions 10 and 11
Revision 10 as of 2019-03-31 14:58:30
Size: 8580
Editor: DavidSmiley
Comment: You can still use Java 8 should be sub-heading under Overview; not equal
Revision 11 as of 2019-04-05 17:19:52
Size: 6042
Comment: Brought up to date with the ref guide
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Solr and Lucene and Java Versions =
{{{#!wiki warning
'''Warning'''
This page is under construction, until it is finalized you should check statements made here with the community, either the Solr or Lucene user's lists are a good place to check.
= Solr System Requirements =

{{{#!wiki important
This Wiki page reproduces the information in the [[http://lucene.apache.org/solr/guide/|Solr 8.0 Reference Guide]] which is in the process of being released (5-Apr, 2019). Once the reference guide is released, this page will be deprecated. You should check the above link for the most recent information.
Line 7: Line 7:
== Executive summary ==
 * OpenJDK is tested extensively and will be used in Lucene/Solr unit tests going forward.
 * Lucene/Solr 7 was the first version of Lucene/Solr that successfully ran with Java 9+. For Lucene/Solr versions prior to 7, it would be prudent to run under Java 8.
 * Lucene/Solr 9 will almost certainly require Java 11
 * Java 9 and 10 have no Long Term Support (LTS), so Java 11 is preferred when considering upgrading Java to 8+.
You can install Solr in any system where a suitable Java Runtime Environment (JRE) is available.

== Installation Requirements ==

=== Supported Operating Systems ===

Solr is tested on several versions of Linux, macOS and Windows.

=== Java Requirements ===

You will need the Java Runtime Environment (JRE) version 1.8 or higher. At a command line, check your Java version like this:
Line 14: Line 20:
There is considerable confusion about "which version of Java should I use with what version of Lucene/Solr". Adding to the confusion is:
 * Oracle's Java 8 is End of Life, and soon Java 8 support from Oracle will require paid subscriptions. It's important to understand that Oracle's Java 8 will still be available, just not ''supported'' by Oracle for free and updates will require a subscription.
 * There are multiple sources of Java
 * There are different versions of Lucene/Solr with different minimal versions of Java required.
 * Java 9 and 10 had very short support cycles and have no Long Term Support.

This page summarizes our (the Lucene/Solr community) current understanding.

== Overview ==

=== You can still use Java 8 ===
First and foremost, there is no requirement to upgrade your Java version until you upgrade to a Lucene/Solr version that requires it. Java 8 has been extensively tested both in the field and by automated tests up through Solr 8. There will be no vendor ''Support or bug fixes'' for Java 8 however.

=== OpenJDK or Oracle ===
For Lucene and Solr, these are identical. Oracle's paid version of Java has two differences from OpenJDK:
 * Oracle provides support
 * Oracle's version has some features not available in OpenJDK

The extra features available from Oracle's version of Java are not used by Lucene or Solr. So for the purposes of the Apache Solr and Lucene projects there's no difference between the two.

Current Lucene/Solr testing uses OpenJDK for Java 9+ and jdk1.8.0_172 for Java 8.

=== Java 9 and 10 ===
Lucene/Solr testing has been regularly performed with Java 9 and 10, and that allowed significantly smoother transition to Java 11. However, as neither one has a Long Term Support (LST) offering, Java 11 is preferred over either.

=== Other Java suppliers ===
Java is available from a number of sources. Lucene and Solr test with OpenJDK and do not regularly test with other versions so you'll have to validate those in your environment. Here's a useful source to help decide: [[https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244|Java Champions]]

If you do not have any opinion or requirements on a particular distribution or version of Java, the free, Open Source OpenJDK version 11 which is the latest LTS (long term support) version is probably your best choice. You can download it from many sources such as
 * [[https://api.adoptopenjdk.net/|AdoptOpenJDK]]
 * [[https://aws.amazon.com/corretto/|Amazon Corretto]]
 * [[https://www.azul.com/downloads/zulu/|Zulu]] or [[https://www.oracle.com/technetwork/java/index.html|Oracle]].

We do not endorse any particular vendor. Note that each vendor may have different policies for bug and security fixes, so choose one you are comfortable with. You may also find that your Operating System already includes a supported version of the JDK.
{{{
$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
}}}
Line 50: Line 28:
There are also commercial paid version of Java. If your organization has a policy on what vendor or version or Java to use, make sure to consult that before deciding. The exact output will vary, but you need to make sure you meet the minimum version requirement. We also recommend choosing a version that is not end-of-life from its vendor. Oracle/OpenJDK are the most tested JREs and are preferred. It's also preferred to use the latest available official release.
Line 52: Line 30:
For security reasons, Java should be kept up to date on minor versions. Never upgrade Java to a higher major version before first checking and testing that it is compatible with the version of Solr you have. Some versions of Java VM have bugs that may impact your implementation. To be sure, check the page [[https://wiki.apache.org/lucene-java/JavaBugs|Lucene Java Bugs]].
Line 54: Line 32:
=== List of known issues ===
We try to maintain a list of know Java issues at: [[https://wiki.apache.org/lucene-java/JavaBugs|Java Bugs]]
=== Sources for Java ===
Java is available from a number of providers. Lucene and Solr regularly test with [[https://jdk.java.net/|OpenJDK]]/Oracle versions of Java. Some are free, others have a cost, some provide security patches and support, others do not. We recommend you read the article [[https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244|Java is still free by Java Champions]] to help you decide.
Line 57: Line 35:
== Lucene and Solr testing ==
Lucene and Solr have extensive unit tests. These tests are regularly run against the various versions of Java.
 * For Java 9 and later we are using [[https://openjdk.java.net|OpenJDK]]
 * For Java 8, we are using jdk1.8.0_172 (March, 2019)
The Lucene project does not endorse any particular provider of Java.
Line 62: Line 37:
=== How we test ===
Solr and Lucene run a continuous integration model. There is ''always'' testing going on against various versions of Java. In addition, some organizations also run their own continuous integration testing and feed back their results to the community.
{{{#!wiki note
While we reference the Java Development (JDK) on this page, any Java Runtime Environment (JRE) associated with the referenced JDKs is acceptable.
}}}
Line 65: Line 41:
We do not maintain this testing infrastructure across older versions once a new major version is released. Taking the current state (March, 2019):
 * Lucene/Solr 8.0 has just been released.
 * Master (the future 9.0) is tested across multiple Java versions, 8, 9, 10, 11, 12 and 13. Should we decide to require Java 11 for Lucene/Solr 9.0, testing with Java 8, 9, and 10 will stop.
 * 8x (the current development branch of Lucene/Solr 8) is tested on Java 8, 9, 10, 11, 12 and 13.
  * Once a point release is made (say Lucene/Solr 8.1), regular testing on the previous point release (8.0 in this example) will stop.
 * 7x is not tested regularly since Lucene/Solr 8.0 was released. If there is ever cause to release a new 7x version, that release will be tested during the release process. Note: there will only be a new 7x "point release" if there are critical bugs discovered or serious security holes.
 * 6x and earlier. As 7x, but with much lower likelihood of a new release.
== Java and Lucene/Solr combinations ==
Each Lucene/Solr release has an extensively tested minimum Java version. For instance the minimum Java version for Solr 8 is Java 8. This section is intended to provide guidance when running Lucene/Solr with a more recent Java version than the minimum specified.
Line 73: Line 44:
Java 8 has had, by far, the most "real world" testing, but it is EoL. Java 11 is preferred over Java 9 or 10, especially given neither 9 nor 10 ever had LTS. Java 11 has been released for over 2 years and will have the most ongoing testing when compared to Java 9 or 10. === Executive summary ===
 * OpenJDK/Oracle distribution are tested extensively and will continue to be tested going forward.
  * Distributions of Java from other source are not regularly tested by our testing infrastructure, therefore you must test Java from those sources in your environment.
  * For the purposes of Lucene and Solr, Oracle's paid version and OpenJDK are are identical.
 * Upgrading Java is not required with the understanding that no Java bugs will be addressed unless you are using a version of Java that provides LTS.
 * Java 8 has been extensively tested both in the field and by automated tests through Solr 8. LTS for Java 8 is provided by some sources, see [[https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244|Java is still free]].
 * Our testing infrastructure continuously tests with the minimum and greater versions of Java for each development branch.
 * Java 9 and 10 have no Long Term Support (LTS). For this reason, Java 11 is preferred over 9 or 10 when upgrading Java.
 * For specific questions the [[http://lucene.apache.org/solr/community.html#mailing-lists-irc|Solr User's List]] is a great resource.
Line 75: Line 54:
Java 12 GA release was in mid March, 2019. As indicated above, Lucene/Solr master(9.0) and 8x versions are continuously tested under Java 12, but there isn't long a track record of testing the GA release. Lucene/Solr 7x had some testing with the release candidates, but not the GA release. The rest of this page summarizes the Lucene/Solr community's testing experience for Lucene/Solr releases.
Line 77: Line 56:
You'll see that Java 13 is also tested. This is typical; the Lucene/Solr testing infrastructure tests pre-release versions of Java long before the GA is available. By the time a version of Java is released, Lucene/Solr has tested with it for months at minimum and provided feedback to the Java developers. === How we test Solr/Lucene ===
Solr and Lucene run a continuous integration model, running automated unit and integration tests using several versions of Java. In addition, some organizations also maintain their own test infrastructure and feed their results back to the community.

Our continuous testing is against the two code lines under active development, Solr 8x and the future Solr 9.0:

 * Lucene/Solr 8.x is the current stable branch and will have "point releases", i.e. 8.1, 8.2... until Lucene/Solr 9.0 is released.
  * This version is currently tested against Java 8, 9, 10, 11, 12 and (pre-release) 13
 * There is also development and testing with the future Lucene/Solr 9.0. There is no planned release date although the cadence has been between 1 and 2 years for major releases.
  * This version will require Java 11, so it is currently tested against Java 11, 12 and (pre-release) 13
 * Lucene/Solr 7x and earlier are not tested on a continuous basis.

=== Released Lucene/Solr and Java Versions ===
The success rate in our automated tests is similar with all the Java versions tested with the following caveats.

==== Lucene/Solr prior to 7.0 ====

 * Lucene/Solr 7.0 was the first version that successfully passed our tests using Java 9+. Our best guidance is to avoid Java 9 or later for Lucene/Solr 6 or earlier.

==== Lucene/Solr 7 ====

 * Requires Java 8+
 * This version had continuous testing with Java 9, 10, 11, 12 and the pre release version of Java 13. Regular testing stopped when Lucene/Solr 8.0 was released.
 * Lucene/Solr 7.0 is the first release of Lucene/Solr that successfully completed our testing with Java 9+.
 * Hadoop with Java 9+ may not work in all situations, test in your environment.
 * Kerberos with Java 9+ may not work in all situations, test in your environment.
 * Be sure to test with SSL/TLS and/or authorization enabled in your environment if you require either when using Java 9+.
Line 80: Line 84:
== Lucene/Solr and Java Versions ==
Below is a summary of what we know. As a general statement, the success rate in our automated tests is similar with all the below caveats.
==== Lucene/Solr 8 ====
Line 83: Line 86:
=== Lucene/Solr prior to Java 7 ===
 * Lucene/Solr 7.0 was the first version that successfully passed our test suites regularly using Java 9. Some of these were "test only" issues, but others were more serious. Our best guidance is to use Java 8 prior to Lucene/Solr 7.

=== Lucene/Solr 7 ===
Line 88: Line 87:
 * Lucene/Solr 7.0 is the first release of Lucene/Solr that successfully completed our testing with Java 9.
 * Hadoop with Java 9 or later does not work in all situations until Lucene/Solr 8.0
 * Kerberos with Java 9 or later may not work in all situations until Lucene/Solr 8.1
 * Java 11 is preferred over Java 9 or 10
  * Be sure to test SSL/TLS and/or authorization enabled in your environment with this version. There have been some test instabilities with one or both of these enabled. We believe that these are due to our test infrastructure.


=== Lucene/Solr 8 ===
 * Requires Java 8+
 * This version has continuous testing with Java 9, 10, 11, 12 and 13. Note: Java 13 is in the very early stages of development as of this writing.
 * Java 11 is preferred over Java 9 or 10
  * Be sure to test SSL/TLS and/or authorization enabled in your environment with this version. There have been some test instabilities with one or both of these enabled. We believe that these are due to our test infrastructure.

=== Lucene/Solr 9 ===
NOTE: This is the current "master" and has not been released as of March, 2019. No date has been proposed. Typically major releases are 1-2 years apart which puts any release of 9.0 into the 2020/2021 timeframe.
 * Requires Java 11 (proposed still being tested under Java 8+ as of March, 2019)
 * If you want to follow the current state of Lucene/Solr 9, you should subscribe to the developer's list or search the JIRA system for mentions of Lucene/Solr issues.
 * This version has continuous testing with Java 9, 10, 11, 12 and the pre release version of Java 13.
 * There were known issues with Kerberos with Java 9+ that will be addressed in Lucene/Solr 8.1, test in your environment.
 * Be sure to test with SSL/TLS and/or authorization enabled in your environment if you require either when using Java 9+.

Solr System Requirements

This Wiki page reproduces the information in the Solr 8.0 Reference Guide which is in the process of being released (5-Apr, 2019). Once the reference guide is released, this page will be deprecated. You should check the above link for the most recent information.

You can install Solr in any system where a suitable Java Runtime Environment (JRE) is available.

Installation Requirements

Supported Operating Systems

Solr is tested on several versions of Linux, macOS and Windows.

Java Requirements

You will need the Java Runtime Environment (JRE) version 1.8 or higher. At a command line, check your Java version like this:

$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

The exact output will vary, but you need to make sure you meet the minimum version requirement. We also recommend choosing a version that is not end-of-life from its vendor. Oracle/OpenJDK are the most tested JREs and are preferred. It's also preferred to use the latest available official release.

Some versions of Java VM have bugs that may impact your implementation. To be sure, check the page Lucene Java Bugs.

Sources for Java

Java is available from a number of providers. Lucene and Solr regularly test with OpenJDK/Oracle versions of Java. Some are free, others have a cost, some provide security patches and support, others do not. We recommend you read the article Java is still free by Java Champions to help you decide.

The Lucene project does not endorse any particular provider of Java.

While we reference the Java Development (JDK) on this page, any Java Runtime Environment (JRE) associated with the referenced JDKs is acceptable.

Java and Lucene/Solr combinations

Each Lucene/Solr release has an extensively tested minimum Java version. For instance the minimum Java version for Solr 8 is Java 8. This section is intended to provide guidance when running Lucene/Solr with a more recent Java version than the minimum specified.

Executive summary

  • OpenJDK/Oracle distribution are tested extensively and will continue to be tested going forward.
    • Distributions of Java from other source are not regularly tested by our testing infrastructure, therefore you must test Java from those sources in your environment.
    • For the purposes of Lucene and Solr, Oracle's paid version and OpenJDK are are identical.
  • Upgrading Java is not required with the understanding that no Java bugs will be addressed unless you are using a version of Java that provides LTS.
  • Java 8 has been extensively tested both in the field and by automated tests through Solr 8. LTS for Java 8 is provided by some sources, see Java is still free.

  • Our testing infrastructure continuously tests with the minimum and greater versions of Java for each development branch.
  • Java 9 and 10 have no Long Term Support (LTS). For this reason, Java 11 is preferred over 9 or 10 when upgrading Java.
  • For specific questions the Solr User's List is a great resource.

The rest of this page summarizes the Lucene/Solr community's testing experience for Lucene/Solr releases.

How we test Solr/Lucene

Solr and Lucene run a continuous integration model, running automated unit and integration tests using several versions of Java. In addition, some organizations also maintain their own test infrastructure and feed their results back to the community.

Our continuous testing is against the two code lines under active development, Solr 8x and the future Solr 9.0:

  • Lucene/Solr 8.x is the current stable branch and will have "point releases", i.e. 8.1, 8.2... until Lucene/Solr 9.0 is released.
    • This version is currently tested against Java 8, 9, 10, 11, 12 and (pre-release) 13
  • There is also development and testing with the future Lucene/Solr 9.0. There is no planned release date although the cadence has been between 1 and 2 years for major releases.
    • This version will require Java 11, so it is currently tested against Java 11, 12 and (pre-release) 13
  • Lucene/Solr 7x and earlier are not tested on a continuous basis.

Released Lucene/Solr and Java Versions

The success rate in our automated tests is similar with all the Java versions tested with the following caveats.

Lucene/Solr prior to 7.0

  • Lucene/Solr 7.0 was the first version that successfully passed our tests using Java 9+. Our best guidance is to avoid Java 9 or later for Lucene/Solr 6 or earlier.

Lucene/Solr 7

  • Requires Java 8+
  • This version had continuous testing with Java 9, 10, 11, 12 and the pre release version of Java 13. Regular testing stopped when Lucene/Solr 8.0 was released.
  • Lucene/Solr 7.0 is the first release of Lucene/Solr that successfully completed our testing with Java 9+.
  • Hadoop with Java 9+ may not work in all situations, test in your environment.
  • Kerberos with Java 9+ may not work in all situations, test in your environment.
  • Be sure to test with SSL/TLS and/or authorization enabled in your environment if you require either when using Java 9+.

Lucene/Solr 8

  • Requires Java 8+
  • This version has continuous testing with Java 9, 10, 11, 12 and the pre release version of Java 13.
  • There were known issues with Kerberos with Java 9+ that will be addressed in Lucene/Solr 8.1, test in your environment.
  • Be sure to test with SSL/TLS and/or authorization enabled in your environment if you require either when using Java 9+.

SolrJavaVersions (last edited 2019-04-05 17:19:52 by ErickErickson)