mirror of https://github.com/apache/lucene.git
SOLR-9386: Move default clientPort specification to before calling QuorumPeerConfig.parseProperties(), which requires that clientPort be specified.
This commit is contained in:
parent
b705217bec
commit
8c11f81a95
|
@ -85,10 +85,10 @@ public class SolrZkServer {
|
||||||
try {
|
try {
|
||||||
props = SolrZkServerProps.getProperties(confHome + '/' + "zoo.cfg");
|
props = SolrZkServerProps.getProperties(confHome + '/' + "zoo.cfg");
|
||||||
SolrZkServerProps.injectServers(props, zkRun, zkHost);
|
SolrZkServerProps.injectServers(props, zkRun, zkHost);
|
||||||
zkProps.parseProperties(props);
|
if (props.getProperty("clientPort") == null) {
|
||||||
if (zkProps.getClientPortAddress() == null) {
|
props.setProperty("clientPort", Integer.toString(solrPort + 1000));
|
||||||
zkProps.setClientPort(solrPort + 1000);
|
|
||||||
}
|
}
|
||||||
|
zkProps.parseProperties(props);
|
||||||
} catch (QuorumPeerConfig.ConfigException | IOException e) {
|
} catch (QuorumPeerConfig.ConfigException | IOException e) {
|
||||||
if (zkRun != null)
|
if (zkRun != null)
|
||||||
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
|
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
|
||||||
|
|
Loading…
Reference in New Issue