janhoy commented on code in PR #3240: URL: https://github.com/apache/solr/pull/3240#discussion_r2462226848
########## solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc: ########## @@ -1144,6 +1141,17 @@ Usage: solr zk upconfig|downconfig -d <confdir> -n <configName> [-z zkHost] [-s NOTE: Solr should have been started at least once before issuing these commands to initialize ZooKeeper with the znodes Solr expects. Once ZooKeeper is initialized, Solr doesn't need to be running on any node to use these commands. +=== ZooKeeper Connection String + +All `bin/solr zk` sub-commands require a ZooKeeper connection string to function. You can provide this in three ways, in order of precedence: + +1. Explicitly pass the `-z` or `--zk-host` option: `bin/solr zk <command> -z <zkHost>` +2. Set the `ZK_HOST` environment variable: `export ZK_HOST=<zkHost>` +3. Define `ZK_HOST` in `solr.in.sh` (or `solr.in.cmd` on Windows) +4. If none are provided, the tools will default to `localhost:2181` Review Comment: @epugh Added this sub-paragraph both to this file and to the `zookeeper-utilities` page, to explain the "hunting order". This is true for the zookeeper tools. Some tools (ConfigTool, ExportTool, PackageTool, PostLogsTool, PostTool and StreamTool) use `normalizeSolrUrl()` function which have a slightly different logic, in that it inspects sysprops to find the local address of solr, and will then not blindly fall back to `localhost:9983` but to `$SOLR_PORT+1000`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
