1
回答
solr集群部署问题
滴滴云服务器,限时包月0.9元,为开发者而生>>>   

@曾杰 你好,想跟你请教个问题:

您好,我这个部署之前是可以的,在重启之后就不行了,错误日志如下

2014-11-13 11:01:05,297 ERROR [coreLoadExecutor-4-thread-1] org.apache.solr.cloud.ZkController (ZkController.java:1226) - Could not find configName for collection programSerial
2014-11-13 11:01:05,299 ERROR [coreLoadExecutor-4-thread-1] org.apache.solr.core.CoreContainer (CoreContainer.java:988) - Unable to create core: programSerial
org.apache.solr.common.cloud.ZooKeeperException: Could not find configName for collection programSerial found:null
at org.apache.solr.cloud.ZkController.getConfName(ZkController.java:1227)
at org.apache.solr.cloud.ZkController.createCollectionZkNode(ZkController.java:1158)
at org.apache.solr.core.ZkContainer.createFromZk(ZkContainer.java:230)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:595)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2014-11-13 11:01:05,301 ERROR [coreLoadExecutor-4-thread-1] org.apache.solr.common.SolrException (SolrException.java:120) - null:org.apache.solr.common.SolrException: Unable to create core: programSerial
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:989)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:606)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.cloud.ZooKeeperException: Could not find configName for collection programSerial found:null
at org.apache.solr.cloud.ZkController.getConfName(ZkController.java:1227)
at org.apache.solr.cloud.ZkController.createCollectionZkNode(ZkController.java:1158)
at org.apache.solr.core.ZkContainer.createFromZk(ZkContainer.java:230)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:595)
... 8 more


配置文件信息

<solr>

<cores adminPath="/admin/cores" host="${host:}" hostPort="${hostport:1080}" hostContext="${hostContext:solr}" zkHost="${zkHost:203.195.197.15:2181}"  zkClientTimeout="${zkClientTimeout:15000}" genericCoreNodeNames="${genericCoreNodeNames:true}">

  <shardHandlerFactory name="shardHandlerFactory"
    class="HttpShardHandlerFactory">
    <int name="socketTimeout">${socketTimeout:0}</int>
    <int name="connTimeout">${connTimeout:0}</int>
    <str name="urlScheme">${urlScheme:}</str>
  </shardHandlerFactory>

<core name="programSerial" instanceDir="programSerial" />
<core name="aspectprogramSerial" instanceDir="aspectprogramSerial" />
</cores>
</solr>


catalina.sh

JAVA_OPTS="$JAVA_OPTS -DzkHost=localhost:2181 -DnumShards=2"

举报
zmf
发帖于3年前 1回/3K+阅
共有1个答案 最后回答: 3年前

zookeeper里面没有这个collection的配置文件,可以先去zookeeper的/config 节点下看有没有指定collection的配置目录,如果没有可以哟个ZkCLI把配置文件初始化进去

--- 共有 2 条评论 ---
曾杰回复 @zmf : Zookeeper本身就是集中管理了,配置文件只要初始化一次就ok了,就把zk当成本地文件系统就行了 3年前 回复
zmf每次都得手动初始化zookeeper么,我现在有两个collection在一个solr应用中,两套独立的配置文件,改怎样让zookeeper集中管理呢?方便加我QQ吗85455281谢谢 3年前 回复
顶部