mirror of https://github.com/apache/lucene.git
SOLR-12435: Fix bin/solr help and ref guide text to describe ZK_HOST in solr.in.sh/solr.in.cmd as an alternative to -z cmdline param
This commit is contained in:
parent
2db2fb3909
commit
fba42bbac6
|
@ -487,6 +487,9 @@ Other Changes
|
|||
|
||||
* SOLR-12437: Document 'bin/solr config' in the ref guide. (Steve Rowe)
|
||||
|
||||
* SOLR-12435: Fix bin/solr help and ref guide text to describe ZK_HOST in solr.in.sh/solr.in.cmd
|
||||
as an alternative to -z cmdline param. (Steve Rowe)
|
||||
|
||||
================== 7.3.1 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -315,6 +315,8 @@ function print_usage() {
|
|||
echo ""
|
||||
echo " ./solr start -c -m 1g -z localhost:2181 -a \"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044\""
|
||||
echo ""
|
||||
echo " Omit '-z localhost:2181' from the above command if you have defined ZK_HOST in solr.in.sh."
|
||||
echo ""
|
||||
echo "Pass -help after any COMMAND to see command-specific usage information,"
|
||||
echo " such as: ./solr start -help or ./solr stop -help"
|
||||
echo ""
|
||||
|
@ -325,8 +327,9 @@ function print_usage() {
|
|||
echo " -f Start Solr in foreground; default starts Solr in the background"
|
||||
echo " and sends stdout / stderr to solr-PORT-console.log"
|
||||
echo ""
|
||||
echo " -c or -cloud Start Solr in SolrCloud mode; if -z not supplied, an embedded Zookeeper"
|
||||
echo " instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983"
|
||||
echo " -c or -cloud Start Solr in SolrCloud mode; if -z not supplied and ZK_HOST not defined in"
|
||||
echo " solr.in.sh, an embedded ZooKeeper instance is started on Solr port+1000,"
|
||||
echo " such as 9983 if Solr is bound to 8983"
|
||||
echo ""
|
||||
echo " -h <host> Specify the hostname for this Solr instance"
|
||||
echo ""
|
||||
|
@ -338,7 +341,8 @@ function print_usage() {
|
|||
echo " -d <dir> Specify the Solr server directory; defaults to server"
|
||||
echo ""
|
||||
echo " -z <zkHost> Zookeeper connection string; only used when running in SolrCloud mode using -c"
|
||||
echo " To launch an embedded Zookeeper instance, don't pass this parameter."
|
||||
echo " If neither ZK_HOST is defined in solr.in.sh nor the -z parameter is specified,"
|
||||
echo " an embedded ZooKeeper instance will be launched."
|
||||
echo ""
|
||||
echo " -m <memory> Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g"
|
||||
echo " results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m"
|
||||
|
@ -398,7 +402,8 @@ function print_usage() {
|
|||
echo ""
|
||||
echo " -c <collection> Collection to run healthcheck against."
|
||||
echo ""
|
||||
echo " -z <zkHost> Zookeeper connection string; default is localhost:9983"
|
||||
echo " -z <zkHost> Zookeeper connection string; unnecessary if ZK_HOST is defined in solr.in.sh;"
|
||||
echo " otherwise, default is localhost:9983"
|
||||
echo ""
|
||||
echo " -V Enable more verbose output"
|
||||
echo ""
|
||||
|
@ -611,7 +616,7 @@ function print_usage() {
|
|||
echo " -updateIncludeFileOnly <true|false> Only update the solr.in.sh or solr.in.cmd file, and skip actual enabling/disabling"
|
||||
echo " authentication (i.e. don't update security.json)"
|
||||
echo ""
|
||||
echo " -z zkHost Zookeeper connection string"
|
||||
echo " -z zkHost Zookeeper connection string. Unnecessary if ZK_HOST is defined in solr.in.sh."
|
||||
echo ""
|
||||
echo " -d <dir> Specify the Solr server directory"
|
||||
echo ""
|
||||
|
|
|
@ -294,6 +294,8 @@ goto done
|
|||
@echo.
|
||||
@echo solr start -c -m 1g -z localhost:2181 -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044"
|
||||
@echo.
|
||||
@echo Omit '-z localhost:2181' from the above command if you have defined ZK_HOST in solr.in.cmd.
|
||||
@echo.
|
||||
@echo Pass -help after any COMMAND to see command-specific usage information,
|
||||
@echo such as: solr start -help or solr stop -help
|
||||
@echo.
|
||||
|
@ -306,8 +308,9 @@ goto done
|
|||
@echo -f Start Solr in foreground; default starts Solr in the background
|
||||
@echo and sends stdout / stderr to solr-PORT-console.log
|
||||
@echo.
|
||||
@echo -c or -cloud Start Solr in SolrCloud mode; if -z not supplied, an embedded Zookeeper
|
||||
@echo instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983
|
||||
@echo -c or -cloud Start Solr in SolrCloud mode; if -z not supplied and ZK_HOST not defined in
|
||||
@echo solr.in.cmd, an embedded ZooKeeper instance is started on Solr port+1000,
|
||||
@echo such as 9983 if Solr is bound to 8983
|
||||
@echo.
|
||||
@echo -h host Specify the hostname for this Solr instance
|
||||
@echo.
|
||||
|
@ -319,7 +322,8 @@ goto done
|
|||
@echo -d dir Specify the Solr server directory; defaults to server
|
||||
@echo.
|
||||
@echo -z zkHost Zookeeper connection string; only used when running in SolrCloud mode using -c
|
||||
@echo To launch an embedded Zookeeper instance, don't pass this parameter.
|
||||
@echo If neither ZK_HOST is defined in solr.in.cmd nor the -z parameter is specified,
|
||||
@echo an embedded ZooKeeper instance will be launched.
|
||||
@echo.
|
||||
@echo -m memory Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g
|
||||
@echo results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m
|
||||
|
@ -391,7 +395,8 @@ goto done
|
|||
@echo.
|
||||
@echo -c collection Collection to run healthcheck against.
|
||||
@echo.
|
||||
@echo -z zkHost Zookeeper connection string; default is localhost:9983
|
||||
@echo -z zkHost Zookeeper connection string; unnecessary if ZK_HOST is defined in solr.in.cmd;
|
||||
@echo otherwise, default is localhost:9983
|
||||
@echo.
|
||||
@echo -V Enable more verbose output
|
||||
@echo.
|
||||
|
@ -512,7 +517,7 @@ echo Can be run on remote (non-Solr^) hosts, as long as valid ZK_HOST in
|
|||
echo Be sure to check the Solr logs in case of errors.
|
||||
echo.
|
||||
echo -z zkHost Optional Zookeeper connection string for all commands. If specified it
|
||||
echo overrides the 'ZK_HOST=...'' defined in solr.in.sh.
|
||||
echo overrides the 'ZK_HOST=...'' defined in solr.in.cmd.
|
||||
echo.
|
||||
echo -V Enable more verbose output.
|
||||
echo.
|
||||
|
@ -628,7 +633,7 @@ echo.
|
|||
echo -updateIncludeFileOnly ^<true^|false^> Only update the solr.in.sh or solr.in.cmd file, and skip actual enabling/disabling"
|
||||
echo authentication (i.e. don't update security.json^)"
|
||||
echo.
|
||||
echo -z zkHost Zookeeper connection string
|
||||
echo -z zkHost Zookeeper connection string. Unnecessary if ZK_HOST is defined in solr.in.cmd.
|
||||
echo.
|
||||
echo -d ^<dir^> Specify the Solr server directory"
|
||||
echo.
|
||||
|
|
|
@ -65,6 +65,8 @@ If you are using SolrCloud, you must upload `security.json` to ZooKeeper. You ca
|
|||
bin/solr zk cp file:path_to_local_security.json zk:/security.json -z localhost:9983
|
||||
----
|
||||
|
||||
NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) you can omit `-z <zk host string>` from the above command.
|
||||
|
||||
=== Caveats
|
||||
|
||||
There are a few things to keep in mind when using the Basic authentication plugin.
|
||||
|
|
|
@ -175,6 +175,8 @@ If you have set up your ZooKeeper cluster to use a <<taking-solr-to-production.a
|
|||
|
||||
=== Run SolrCloud with SSL
|
||||
|
||||
NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) you can omit `-z <zk host string>` from all of the `bin/solr`/`bin\solr.cmd` commands below.
|
||||
|
||||
==== Create Solr Home Directories for Two Nodes
|
||||
|
||||
Create two copies of the `server/solr/` directory which will serve as the Solr home directories for each of your two SolrCloud nodes:
|
||||
|
|
|
@ -298,6 +298,8 @@ Once the configuration is complete, you can start Solr with the `bin/solr` scrip
|
|||
bin/solr -c -z server1:2181,server2:2181,server3:2181/solr
|
||||
----
|
||||
|
||||
NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) you can omit `-z <zk host string>` from the above command.
|
||||
|
||||
=== Test the Configuration
|
||||
|
||||
. Do a `kinit` with your username. For example, `kinit \user@EXAMPLE.COM`.
|
||||
|
|
|
@ -60,7 +60,7 @@ Start Solr in SolrCloud mode, which will also launch the embedded ZooKeeper inst
|
|||
+
|
||||
This option can be shortened to simply `-c`.
|
||||
+
|
||||
If you are already running a ZooKeeper ensemble that you want to use instead of the embedded (single-node) ZooKeeper, you should also pass the -z parameter.
|
||||
If you are already running a ZooKeeper ensemble that you want to use instead of the embedded (single-node) ZooKeeper, you should also either specify `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) or pass the -z parameter.
|
||||
+
|
||||
For more details, see the section <<SolrCloud Mode>> below.
|
||||
+
|
||||
|
@ -137,7 +137,7 @@ Start Solr with verbose messages from the start script.
|
|||
*Example*: `bin/solr start -V`
|
||||
|
||||
`-z <zkHost>`::
|
||||
Start Solr with the defined ZooKeeper connection string. This option is only used with the -c option, to start Solr in SolrCloud mode. If this option is not provided, Solr will start the embedded ZooKeeper instance and use that instance for SolrCloud operations.
|
||||
Start Solr with the defined ZooKeeper connection string. This option is only used with the -c option, to start Solr in SolrCloud mode. If `ZK_HOST` is not specified in `solr.in.sh`/`solr.in.cmd` and this option is not provided, Solr will start the embedded ZooKeeper instance and use that instance for SolrCloud operations.
|
||||
+
|
||||
*Example*: `bin/solr start -c -z server1:2181,server2:2181`
|
||||
|
||||
|
@ -172,7 +172,9 @@ The `-c` and `-cloud` options are equivalent:
|
|||
|
||||
If you specify a ZooKeeper connection string, such as `-z 192.168.1.4:2181`, then Solr will connect to ZooKeeper and join the cluster.
|
||||
|
||||
If you do not specify the `-z` option when starting Solr in cloud mode, then Solr will launch an embedded ZooKeeper server listening on the Solr port + 1000, i.e., if Solr is running on port 8983, then the embedded ZooKeeper will be listening on port 9983.
|
||||
NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) you can omit `-z <zk host string>` from all `bin/solr` commands.
|
||||
|
||||
When starting Solr in cloud mode, if you neither define `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` nor specify the `-z` option, then Solr will launch an embedded ZooKeeper server listening on the Solr port + 1000, i.e., if Solr is running on port 8983, then the embedded ZooKeeper will be listening on port 9983.
|
||||
|
||||
[IMPORTANT]
|
||||
====
|
||||
|
@ -328,7 +330,7 @@ The `healthcheck` command generates a JSON-formatted health report for a collect
|
|||
*Example*: `bin/solr healthcheck -c gettingstarted`
|
||||
|
||||
`-z <zkhost>`::
|
||||
ZooKeeper connection string, defaults to `localhost:9983`. If you are running Solr on a port other than 8983, you will have to specify the ZooKeeper connection string. By default, this will be the Solr port + 1000.
|
||||
ZooKeeper connection string, defaults to `localhost:9983`. If you are running Solr on a port other than 8983, you will have to specify the ZooKeeper connection string. By default, this will be the Solr port + 1000. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `bin/solr healthcheck -z localhost:2181`
|
||||
|
||||
|
@ -563,7 +565,7 @@ When *true*, blocks all unauthenticated users from accessing Solr. This defaults
|
|||
When *true*, only the settings in `bin/solr.in.sh` or `bin\solr.in.cmd` will be updated, and `security.json` will not be created.
|
||||
|
||||
`-z`::
|
||||
Defines the ZooKeeper connect string. This is useful if you want to enable authentication before all your Solr nodes have come up.
|
||||
Defines the ZooKeeper connect string. This is useful if you want to enable authentication before all your Solr nodes have come up. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
|
||||
`-d`::
|
||||
Defines the Solr server directory, by default `$SOLR_HOME/server`. It is not common to need to override the default, and is only needed if you have customized the `$SOLR_HOME` directory path.
|
||||
|
@ -672,7 +674,7 @@ If just a name is supplied, `$SOLR_HOME/server/solr/configsets` will be checked
|
|||
* `-d /path/to/configset/source`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
@ -711,7 +713,7 @@ In either case, _pre-existing configurations at the destination will be overwrit
|
|||
* `-d /path/to/configset/destination`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
@ -752,7 +754,7 @@ At least one of `<src>` or `<dest>` must be prefixed by `zk:` or the command wil
|
|||
* `file:/Users/apache/configs/src`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
@ -791,7 +793,7 @@ The path is assumed to be a ZooKeeper node, no `zk:` prefix is necessary.
|
|||
* `/configs/myconfigset/solrconfig.xml`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
@ -819,7 +821,7 @@ The new name of the znode. The `zk:` prefix is assumed.
|
|||
*Example*: `/configs/newconfigset`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
@ -845,7 +847,7 @@ The path on ZooKeeper to list.
|
|||
*Example*: `/collections/mycollection`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
@ -868,7 +870,7 @@ The path on ZooKeeper to create. Intermediate znodes will be created if necessar
|
|||
*Example*: `/solr`
|
||||
|
||||
`-z <zkHost>`::
|
||||
The ZooKeeper connection string. Unnecessary if ZK_HOST is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
The ZooKeeper connection string. Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
|
||||
+
|
||||
*Example*: `-z 123.321.23.43:2181`
|
||||
|
||||
|
|
|
@ -497,6 +497,8 @@ This starts the first node. When it's done start the second node, and tell it ho
|
|||
|
||||
`./bin/solr start -c -p 7574 -s example/cloud/node2/solr -z localhost:9983`
|
||||
|
||||
NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) you can omit `-z <zk host string>` from the above command.
|
||||
|
||||
=== Create a New Collection
|
||||
|
||||
We're going to use a whole new data set in this exercise, so it would be better to have a new collection instead of trying to reuse the one we had before.
|
||||
|
|
|
@ -84,3 +84,5 @@ If you for example would like to keep your `solr.xml` in ZooKeeper to avoid havi
|
|||
----
|
||||
bin/solr zk cp file:local/file/path/to/solr.xml zk:/solr.xml -z localhost:2181
|
||||
----
|
||||
|
||||
NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<setting-up-an-external-zookeeper-ensemble#updating-solr-s-include-files,instructions>>) you can omit `-z <zk host string>` from the above command.
|
Loading…
Reference in New Issue