You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2014/12/01 21:00:01 UTC
svn commit: r1642747 - in /lucene/dev/branches/branch_5x/solr: CHANGES.txt
bin/solr bin/solr.cmd bin/solr.in.cmd bin/solr.in.sh
Author: thelabdude
Date: Mon Dec 1 20:00:00 2014
New Revision: 1642747
URL: http://svn.apache.org/r1642747
Log:
SOLR-6726: better strategy for selecting the JMX RMI port based on SOLR_PORT in bin/solr
Modified:
lucene/dev/branches/branch_5x/solr/CHANGES.txt
lucene/dev/branches/branch_5x/solr/bin/solr
lucene/dev/branches/branch_5x/solr/bin/solr.cmd
lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd
lucene/dev/branches/branch_5x/solr/bin/solr.in.sh
Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1642747&r1=1642746&r2=1642747&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Mon Dec 1 20:00:00 2014
@@ -252,13 +252,6 @@ Bug Fixes
it caused long startup times on lage indexes even when it wasn't used.
(yonik)
-* SOLR-6662: better validation when parsing command-line options that expect a value
- (Timothy Potter)
-
-* SOLR-6705: Better strategy for dealing with JVM specific options in the start
- scripts; remove -XX:+AggressiveOpts and only set -XX:-UseSuperWord for Java 1.7u40
- to u51. (Uwe Schindler, janhoy, hossman, Timothy Potter)
-
* SOLR-6738: Admin UI - Escape Data on Plugins-View (steffkes)
* SOLR-3774: Solr adds RequestHandler SolrInfoMBeans twice to the JMX server.
@@ -362,10 +355,6 @@ Other Changes
* SOLR-6651: Fix wrong timeout logged in waitForReplicasToComeUp. (shalin)
-* SOLR-6661: Adjust all example configurations to allow overriding error-prone
- relative paths for solrconfig.xml <lib> references with solr.install.dir
- system property; bin/solr scripts will set it appropriately. (ehatcher)
-
* SOLR-6698: Solr is not consistent wrt ZkCredentialsProvider / ZkCredentialProvider.
References to zkCredentialProvider in System properties or configurations should be
changed to zkCredentialsProvider. (Gregory Chanan)
@@ -448,6 +437,26 @@ Bug Fixes
* SOLR-6610: Slow startup of new clusters because ZkController.publishAndWaitForDownStates
always times out. (Jessica Cheng Mallet, shalin, Noble Paul)
+* SOLR-6662: better validation when parsing command-line options that expect a value
+ (Timothy Potter)
+
+* SOLR-6732: Fix handling of leader-initiated recovery state was String in older versions
+ and is now a JSON map, caused backwards compatibility issues when doing rolling upgrades of
+ a live cluster while indexing (Timothy Potter)
+
+* SOLR-6705: Better strategy for dealing with JVM specific options in the start
+ scripts; remove -XX:+AggressiveOpts and only set -XX:-UseSuperWord for Java 1.7u40
+ to u51. (Uwe Schindler, janhoy, hossman, Timothy Potter)
+
+* SOLR-6726: better strategy for selecting the JMX RMI port based on SOLR_PORT in bin/solr
+ script (Timothy Potter)
+
+Other Changes
+----------------------
+
+* SOLR-6661: Adjust all example configurations to allow overriding error-prone
+ relative paths for solrconfig.xml <lib> references with solr.install.dir
+ system property; bin/solr scripts will set it appropriately. (ehatcher)
================== 4.10.2 ==================
Modified: lucene/dev/branches/branch_5x/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr?rev=1642747&r1=1642746&r2=1642747&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr Mon Dec 1 20:00:00 2014
@@ -150,6 +150,9 @@ function print_usage() {
echo " -h <host> Specify the hostname for this Solr instance"
echo ""
echo " -p <port> Specify the port to start the Solr HTTP listener on; default is 8983"
+ echo " The specified port (SOLR_PORT) will also be used to determine the stop port"
+ echo " STOP_PORT=(\$SOLR_PORT-1000) and JMX RMI listen port RMI_PORT=(1\$SOLR_PORT). "
+ echo " For instance, if you set -p 8985, then the STOP_PORT=7985 and RMI_PORT=18985"
echo ""
echo " -d <dir> Specify the Solr server directory; defaults to server"
echo ""
@@ -173,9 +176,9 @@ function print_usage() {
echo " schemaless: Schema-less example"
echo ""
echo " -a Additional parameters to pass to the JVM when starting Solr, such as to setup"
- echo " Java debug options. For example, to enable a Java debugger to attach to the Solr JVM"
- echo " you could pass: -a \"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\""
- echo " In most cases, you should wrap the additional parameters in double quotes."
+ echo " Java debug options. For example, to enable a Java debugger to attach to the Solr JVM"
+ echo " you could pass: -a \"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\""
+ echo " In most cases, you should wrap the additional parameters in double quotes."
echo ""
echo " -noprompt Don't prompt for input; accept all defaults when running examples that accept user input"
echo ""
@@ -191,10 +194,6 @@ function print_usage() {
echo ""
echo " -all Find and stop all running Solr servers on this host"
echo ""
- echo " -V Verbose messages from this script"
- echo ""
- echo "NOTE: If port is not specified, then all running Solr servers are stopped."
- echo ""
elif [ "$CMD" == "healthcheck" ]; then
echo ""
echo "Usage: solr healthcheck [-c collection] [-z zkHost]"
@@ -874,8 +873,7 @@ if [[ "$SCRIPT_CMD" == "start" ]]; then
SOLR_PID=`ps auxww | grep start.jar | grep $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
fi
if [ "$SOLR_PID" != "" ]; then
- echo -e "\nSolr already running on port $SOLR_PORT (pid: $SOLR_PID)!"
- echo -e "Please use the 'restart' command if you want to restart this node.\n"
+ echo -e "\nPort $SOLR_PORT is already being used by another process (pid: $SOLR_PID)\n"
exit
fi
else
@@ -962,12 +960,17 @@ fi
# These are useful for attaching remove profilers like VisualVM/JConsole
if [ "$ENABLE_REMOTE_JMX_OPTS" == "true" ]; then
+
+ if [ "$RMI_PORT" == "" ]; then
+ RMI_PORT=1$SOLR_PORT
+ fi
+
REMOTE_JMX_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.local.only=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
--Dcom.sun.management.jmxremote.port=10${SOLR_PORT: -2} \
--Dcom.sun.management.jmxremote.rmi.port=10${SOLR_PORT: -2}"
+-Dcom.sun.management.jmxremote.port=$RMI_PORT \
+-Dcom.sun.management.jmxremote.rmi.port=$RMI_PORT"
# if the host is set, then set that as the rmi server hostname
if [ "$SOLR_HOST" != "" ]; then
@@ -1011,24 +1014,34 @@ function launch_solr() {
if $verbose ; then
echo -e "\nStarting Solr using the following settings:"
+ echo -e " JAVA = $JAVA"
echo -e " SOLR_SERVER_DIR = $SOLR_SERVER_DIR"
echo -e " SOLR_HOME = $SOLR_HOME"
- echo -e " JAVA = $JAVA"
echo -e " SOLR_HOST = $SOLR_HOST"
echo -e " SOLR_PORT = $SOLR_PORT"
+ echo -e " STOP_PORT = $STOP_PORT"
+ echo -e " SOLR_JAVA_MEM = $SOLR_JAVA_MEM"
echo -e " GC_TUNE = $GC_TUNE"
echo -e " GC_LOG_OPTS = $GC_LOG_OPTS"
- echo -e " SOLR_JAVA_MEM = $SOLR_JAVA_MEM"
- echo -e " REMOTE_JMX_OPTS = $REMOTE_JMX_OPTS"
- echo -e " CLOUD_MODE_OPTS = $CLOUD_MODE_OPTS"
echo -e " SOLR_TIMEZONE = $SOLR_TIMEZONE"
-
+
+ if [ "$SOLR_MODE" == "solrcloud" ]; then
+ echo -e " CLOUD_MODE_OPTS = $CLOUD_MODE_OPTS"
+ fi
+
if [ "$SOLR_OPTS" != "" ]; then
echo -e " SOLR_OPTS = $SOLR_OPTS"
fi
+
if [ "$SOLR_ADDL_ARGS" != "" ]; then
echo -e " SOLR_ADDL_ARGS = $SOLR_ADDL_ARGS"
fi
+
+ if [ "$ENABLE_REMOTE_JMX_OPTS" == "true" ]; then
+ echo -e " RMI_PORT = $RMI_PORT"
+ echo -e " REMOTE_JMX_OPTS = $REMOTE_JMX_OPTS"
+ fi
+ echo -e "\n"
fi
# need to launch solr from the server dir
Modified: lucene/dev/branches/branch_5x/solr/bin/solr.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.cmd?rev=1642747&r1=1642746&r2=1642747&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.cmd (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.cmd Mon Dec 1 20:00:00 2014
@@ -172,8 +172,6 @@ goto done
@echo.
@echo -all Find and stop all running Solr servers on this host
@echo.
-@echo -V Verbose messages from this script
-@echo.
goto done
:healthcheck_usage
@@ -587,12 +585,13 @@ IF "%SOLR_MODE%"=="solrcloud" (
REM These are useful for attaching remove profilers like VisualVM/JConsole
IF "%ENABLE_REMOTE_JMX_OPTS%"=="true" (
+ IF "!RMI_PORT!"=="" set RMI_PORT=1%SOLR_PORT%
set REMOTE_JMX_OPTS=-Dcom.sun.management.jmxremote ^
-Dcom.sun.management.jmxremote.local.only=false ^
-Dcom.sun.management.jmxremote.ssl=false ^
-Dcom.sun.management.jmxremote.authenticate=false ^
--Dcom.sun.management.jmxremote.port=10%SOLR_PORT:~-2,2% ^
--Dcom.sun.management.jmxremote.rmi.port=10%SOLR_PORT:~-2,2%
+-Dcom.sun.management.jmxremote.port=!RMI_PORT! ^
+-Dcom.sun.management.jmxremote.rmi.port=!RMI_PORT!
IF NOT "%SOLR_HOST%"=="" set REMOTE_JMX_OPTS=%REMOTE_JMX_OPTS% -Djava.rmi.server.hostname=%SOLR_HOST%
) ELSE (
@@ -636,18 +635,28 @@ IF "%verbose%"=="1" (
@echo SOLR_HOME = %SOLR_HOME%
@echo SOLR_HOST = %SOLR_HOST%
@echo SOLR_PORT = %SOLR_PORT%
+ @echo STOP_PORT = %STOP_PORT%
+ @echo SOLR_JAVA_MEM = %SOLR_JAVA_MEM%
@echo GC_TUNE = !GC_TUNE!
@echo GC_LOG_OPTS = %GC_LOG_OPTS%
- @echo SOLR_JAVA_MEM = %SOLR_JAVA_MEM%
- @echo REMOTE_JMX_OPTS = %REMOTE_JMX_OPTS%
- @echo CLOUD_MODE_OPTS = %CLOUD_MODE_OPTS%
@echo SOLR_TIMEZONE = %SOLR_TIMEZONE%
+
+ IF "%SOLR_MODE%"=="solrcloud" (
+ @echo CLOUD_MODE_OPTS = %CLOUD_MODE_OPTS%
+ )
+
IF NOT "%SOLR_OPTS%"=="" (
@echo SOLR_OPTS = %SOLR_OPTS%
)
+
IF NOT "%SOLR_ADDL_ARGS%"=="" (
@echo SOLR_ADDL_ARGS = %SOLR_ADDL_ARGS%
)
+
+ IF "%ENABLE_REMOTE_JMX_OPTS%"=="true" (
+ @echo RMI_PORT = !RMI_PORT!
+ @echo REMOTE_JMX_OPTS = %REMOTE_JMX_OPTS%
+ )
)
set START_OPTS=-Duser.timezone=%SOLR_TIMEZONE% -Djava.net.preferIPv4Stack=true
Modified: lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd?rev=1642747&r1=1642746&r2=1642747&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd Mon Dec 1 20:00:00 2014
@@ -63,6 +63,9 @@ REM JMX savvy tools like VisualVM remote
REM (recommended in production environments)
set ENABLE_REMOTE_JMX_OPTS=true
+REM The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
+REM set RMI_PORT=18983
+
REM Anything you add to the SOLR_OPTS variable will be included in the java
REM start command line as-is, in ADDITION to other options. If you specify the
REM -a option on start script, those options will be appended as well. Examples:
Modified: lucene/dev/branches/branch_5x/solr/bin/solr.in.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.in.sh?rev=1642747&r1=1642746&r2=1642747&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.in.sh (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.in.sh Mon Dec 1 20:00:00 2014
@@ -61,6 +61,9 @@ GC_TUNE="-XX:NewRatio=3 \
# (recommended in production environments)
ENABLE_REMOTE_JMX_OPTS="true"
+# The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
+# RMI_PORT=18983
+
# Anything you add to the SOLR_OPTS variable will be included in the java
# start command line as-is, in ADDITION to other options. If you specify the
# -a option on start script, those options will be appended as well. Examples: