From 047b368b599bdb678dde10ba01b8a6b1d2739f72 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Fri, 3 Feb 2012 16:41:32 +0000 Subject: [PATCH] SOLR-3091: When running in SolrCloud mode, whether a instance is supposed to be part of the quorum or not, it tries to start a local Solr ZK server. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1240239 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/solr/core/CoreContainer.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java index 5a9eda7d128..92351bba26c 100644 --- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java +++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java @@ -147,13 +147,15 @@ public class CoreContainer // TODO: remove after updating to an slf4j based zookeeper System.setProperty("zookeeper.jmx.log4j.disable", "true"); - zkServer = new SolrZkServer(zkRun, zookeeperHost, solrHome, hostPort); - zkServer.parseConfig(); - zkServer.start(); - - // set client from server config if not already set - if (zookeeperHost == null) { - zookeeperHost = zkServer.getClientString(); + if (zkRun != null) { + zkServer = new SolrZkServer(zkRun, zookeeperHost, solrHome, hostPort); + zkServer.parseConfig(); + zkServer.start(); + + // set client from server config if not already set + if (zookeeperHost == null) { + zookeeperHost = zkServer.getClientString(); + } } int zkClientConnectTimeout = 15000;