0

I'm upgrading from solr4.1.0 to solr4.7.1. previously, I deployed SolrCloud(more than 2 nodes) which using an external ZooKeeper ensemble. the solr.xml looks like:

<solr persistent="true" sharedLib="lib">
  <cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:}" hostContext="solr">
    <core collection="collection1" name="core1" instanceDir="core1" />
  </cores>
</solr>

and I bootstrap the cloud by the following command on one node:

java -Djetty.port=8983 -Dsolr.solr.home=/dir/to/mysolrhome -Dbootstrap_conf=true -DzkHost=zookeeper1:2181 -jar start.jar

and use the following command to start other solr nodes:

java -Djetty.port=8983 -Dsolr.solr.home=/dir/to/mysolrhome -DzkHost=zookeeper1:2181 -jar start.jar

my directory structure of solr.home is:

mysolrhome    
    |--core1
    |--solr.xml

everything is going well when using solr4.1.0.

but when I upgrade solr to v4.7.1, I got the follwoing Exception:

5955 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.common.cloud.ZkStateReader  - Specified config does not exist in ZooKeeper:collection1
5957 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  - Unable to create core: core1
org.apache.solr.common.cloud.ZooKeeperException: Specified config does not exist in ZooKeeper:collection1
    at org.apache.solr.common.cloud.ZkStateReader.readConfigName(ZkStateReader.java:152)
    at org.apache.solr.core.ZkContainer.createFromZk(ZkContainer.java:233)
    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$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
5959 [coreLoadExecutor-4-thread-1] ERROR org.apache.solr.core.CoreContainer  - null:org.apache.solr.common.SolrException: Unable to create core: core1
    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$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.solr.common.cloud.ZooKeeperException: Specified config does not exist in ZooKeeper:collection1
    at org.apache.solr.common.cloud.ZkStateReader.readConfigName(ZkStateReader.java:152)
    at org.apache.solr.core.ZkContainer.createFromZk(ZkContainer.java:233)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:595)
    ... 10 more

I check the zookeeper, it shows the following structure: enter image description here it seems the configure directory uploaded to the zookeeper is the core name core1, but solr load the configure directory for collection name collection1.

and when I change solr.xml to set the core name to collection1, it will work.

My question is, can I configure the uploaded config directory for each collection? or if I change my core name, is there any side-effect to my previous application? or arethere any other solutions?

I don't use -Dbootstrap_confdir, because it only support one collection. I have multiple collections with different schema used.

thanks in advance.

Freedom
  • 803
  • 10
  • 26

1 Answers1

1

finally, I change the collection name("collection1") to the core name("core1").

Freedom
  • 803
  • 10
  • 26