mirror of https://github.com/apache/lucene.git
SOLR-12434: Fix standalone mode 'bin/solr config' to not pass in empty -z ZK_HOST param; revert accidental ZK_HOST definition in solr.in.cmd
This commit is contained in:
parent
5ae716c412
commit
6f9f4f70f2
|
@ -940,7 +940,13 @@ if [[ "$SCRIPT_CMD" == "config" ]]; then
|
|||
esac
|
||||
done
|
||||
fi
|
||||
run_tool config -zkHost "$ZK_HOST" -scheme "$SOLR_URL_SCHEME" "${CONFIG_PARAMS[@]}"
|
||||
if [[ -n "$ZK_HOST" ]]; then
|
||||
CONFIG_PARAMS+=("-z" "$ZK_HOST")
|
||||
fi
|
||||
if [[ -n "$SOLR_URL_SCHEME" ]]; then
|
||||
CONFIG_PARAMS+=("-scheme" "$SOLR_URL_SCHEME")
|
||||
fi
|
||||
run_tool config "${CONFIG_PARAMS[@]}"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
|
|
@ -1426,10 +1426,13 @@ SHIFT
|
|||
goto parse_config_args
|
||||
|
||||
:run_config
|
||||
IF NOT "!ZK_HOST!"=="" SET "CONFIG_ARGS=!CONFIG_ARGS! -z !ZK_HOST!"
|
||||
IF NOT "!SOLR_URL_SCHEME!"=="" SET "CONFIG_ARGS=!CONFIG_ARGS! -scheme !SOLR_URL_SCHEME!"
|
||||
|
||||
"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" ^
|
||||
-Dlog4j.configurationFile="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j2.xml" ^
|
||||
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
|
||||
org.apache.solr.util.SolrCLI config -zkHost !ZK_HOST! -scheme !SOLR_URL_SCHEME! !CONFIG_ARGS!
|
||||
org.apache.solr.util.SolrCLI config !CONFIG_ARGS!
|
||||
if errorlevel 1 (
|
||||
exit /b 1
|
||||
)
|
||||
|
|
|
@ -39,7 +39,7 @@ REM set GC_TUNE=-XX:NewRatio=3 -XX:SurvivorRatio=4 etc.
|
|||
REM Set the ZooKeeper connection string if using an external ZooKeeper ensemble
|
||||
REM e.g. host1:2181,host2:2181/chroot
|
||||
REM Leave empty if not using SolrCloud
|
||||
set ZK_HOST=localhost:2181
|
||||
REM set ZK_HOST=
|
||||
|
||||
REM Set the ZooKeeper client timeout (for SolrCloud mode)
|
||||
REM set ZK_CLIENT_TIMEOUT=15000
|
||||
|
|
Loading…
Reference in New Issue