SOLR-9137: bin/solr script ignored custom STOP_PORT on shutdown.

(Joachim Kohlhammer, Steve Rowe, Christine Poerschke)
This commit is contained in:
Christine Poerschke 2017-12-05 12:19:14 +00:00
parent cd10d0bda0
commit 9268b2b30f
3 changed files with 6 additions and 3 deletions

View File

@ -165,6 +165,9 @@ Bug Fixes
* SOLR-11687: SolrCore.getNewIndexDir falsely returns {dataDir}/index on any IOException reading index.properties * SOLR-11687: SolrCore.getNewIndexDir falsely returns {dataDir}/index on any IOException reading index.properties
(Nikolay Martynov, Erick Erickson) (Nikolay Martynov, Erick Erickson)
* SOLR-9137: bin/solr script ignored custom STOP_PORT on shutdown.
(Joachim Kohlhammer, Steve Rowe, Christine Poerschke)
Optimizations Optimizations
---------------------- ----------------------
* SOLR-11285: Refactor autoscaling framework to avoid direct references to Zookeeper and Solr * SOLR-11285: Refactor autoscaling framework to avoid direct references to Zookeeper and Solr

View File

@ -729,7 +729,7 @@ function stop_solr() {
DIR="$1" DIR="$1"
SOLR_PORT="$2" SOLR_PORT="$2"
STOP_PORT=`expr $SOLR_PORT - 1000` STOP_PORT="${STOP_PORT:-$(expr $SOLR_PORT - 1000)}"
STOP_KEY="$3" STOP_KEY="$3"
SOLR_PID="$4" SOLR_PID="$4"

View File

@ -964,7 +964,7 @@ IF "%SCRIPT_CMD%"=="stop" (
IF "%%j"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" ( IF "%%j"=="%SOLR_JETTY_HOST%:!SOME_SOLR_PORT!" (
set found_it=1 set found_it=1
@echo Stopping Solr process %%k running on port !SOME_SOLR_PORT! @echo Stopping Solr process %%k running on port !SOME_SOLR_PORT!
set /A STOP_PORT=!SOME_SOLR_PORT! - 1000 IF "%STOP_PORT%"=="" set /A STOP_PORT=!SOME_SOLR_PORT! - 1000
"%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop
del "%SOLR_TIP%"\bin\solr-!SOME_SOLR_PORT!.port del "%SOLR_TIP%"\bin\solr-!SOME_SOLR_PORT!.port
timeout /T 5 timeout /T 5
@ -994,7 +994,7 @@ IF "%SCRIPT_CMD%"=="stop" (
IF "%%M"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" ( IF "%%M"=="%SOLR_JETTY_HOST%:%SOLR_PORT%" (
set found_it=1 set found_it=1
@echo Stopping Solr process %%N running on port %SOLR_PORT% @echo Stopping Solr process %%N running on port %SOLR_PORT%
set /A STOP_PORT=%SOLR_PORT% - 1000 IF "%STOP_PORT%"=="" set /A STOP_PORT=%SOLR_PORT% - 1000
"%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" "%SOLR_JETTY_CONFIG%" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" "%SOLR_JETTY_CONFIG%" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop
del "%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port del "%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port
timeout /T 5 timeout /T 5