Skip to content

Apache Lucene open-source search software

Fix Windows startup script to disable HTTP/2 if TLS is enabled on Java 8.

Uwe Schindlerdb5f1af59bb2
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 62febfdee6a..3579e9d5874 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -311,6 +311,8 @@ Bug Fixes
* SOLR-13255 : ClasscastException when URPs try to read a String field which returns a ByteArrayUTF8CHarSequence . This is a regression
in release 7.7 (noble)
+*SOLR-13299: Fix Windows startup script to disable HTTP/2 if TLS is enabled on Java 8. (Uwe Schindler)
+
Improvements
----------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 34eaf66b4c6..d3932bfc177 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -58,7 +58,12 @@ IF NOT DEFINED SOLR_SSL_ENABLED (
)
IF "%SOLR_SSL_ENABLED%"=="true" (
- set "SOLR_JETTY_CONFIG=--lib="%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*" --module=https"
+ set "SOLR_JETTY_CONFIG=--lib="%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*""
+ if !JAVA_MAJOR_VERSION! GEQ 9 (
+ set "SOLR_JETTY_CONFIG=!SOLR_JETTY_CONFIG! --module=https"
+ ) else (
+ set "SOLR_JETTY_CONFIG=!SOLR_JETTY_CONFIG! --module=https8"
+ )
set SOLR_URL_SCHEME=https
IF DEFINED SOLR_SSL_KEY_STORE (
set "SOLR_SSL_OPTS=!SOLR_SSL_OPTS! -Dsolr.jetty.keystore=%SOLR_SSL_KEY_STORE%"