SolrCloud - 如何解决 "Could not find collection configName"

SolrCloud - How to resolve "Could not find collection configName"

我正在尝试以 SolrCloud 模式启动 Solr。我从 collection1 创建了一个新集合,并通过设置 属性 name=logmail.

在文件 core.properties 中更改了它的名称

但是当我启动 Solr 时,出现以下错误

$ java -Dcollection.configName=logmail -DzkRun -Dnumshards=2 -DBootstrap_confdir=./solr/logmail/conf -jar start.jar

2165 [main] INFO org.apache.solr.common.cloud.ZkStateReader – Updating cluster state from ZooKeeper... 2179 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – Starting to work on the main queue 2197 [main] INFO org.apache.solr.core.CoresLocator – Looking for core definitions underneath /home/rahul/Desktop/dev/solrcloud/solr 2203 [main] INFO org.apache.solr.core.CoresLocator – Found core logmail in /home/rahul/Desktop/dev/solrcloud/solr/logmail/ 2204 [main] INFO org.apache.solr.core.CoresLocator – Found core collection1 in /home/rahul/Desktop/dev/solrcloud/solr/collection1/ 2204 [main] INFO org.apache.solr.core.CoresLocator – Found 2 core definitions 2207 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – publishing core=logmail state=down collection=logmail 2207 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – publishing core=collection1 state=down collection=collection1 2208 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – numShards not found on descriptor - reading it from system property 2208 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – numShards not found on descriptor - reading it from system property 2214 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – look for our core node name 2214 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – waiting to find shard id in clusterstate for logmail 2214 [zkCallback-2-thread-1] INFO org.apache.solr.cloud.DistributedQueue – NodeChildrenChanged fired on path /overseer/queue state SyncConnected 2215 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Check for collection zkNode:logmail 2222 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – look for our core node name 2222 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Creating collection in ZooKeeper:logmail 2222 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – waiting to find shard id in clusterstate for collection1 2223 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Looking for collection configName 2223 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Check for collection zkNode:collection1 2224 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Creating collection in ZooKeeper:collection1 2224 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Looking for collection configName 2225 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 1 2226 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 1 2226 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – Update state numShards=null message={ "core":"logmail", "roles":null,
"base_url":"http://127.0.1.1:8983/solr",
"node_name":"127.0.1.1:8983_solr", "state":"down", "shard":null,
"collection":"logmail", "operation":"state"} 2226 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – node=core_node1 is already registered 2227 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – shard=shard1 is already registered 2255 [zkCallback-2-thread-1] INFO org.apache.solr.common.cloud.ZkStateReader – A cluster state change: WatchedEvent state:SyncConnected type:NodeDataChanged path:/clusterstate.json, has occurred - updating... (live nodes size: 1) 2268 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – Update state numShards=null message={ "core":"collection1", "roles":null,
"base_url":"http://127.0.1.1:8983/solr",
"node_name":"127.0.1.1:8983_solr", "state":"down", "shard":null,
"collection":"collection1", "operation":"state"} 2268 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – node=core_node1 is already registered 2269 [OverseerStateUpdate-94955713964081152-127.0.1.1:8983_solr-n_0000000001] INFO org.apache.solr.cloud.Overseer – shard=shard1 is already registered 2288 [zkCallback-2-thread-1] INFO org.apache.solr.cloud.DistributedQueue – NodeChildrenChanged fired on path /overseer/queue state SyncConnected 2318 [zkCallback-2-thread-1] INFO org.apache.solr.common.cloud.ZkStateReader – A cluster state change: WatchedEvent state:SyncConnected type:NodeDataChanged path:/clusterstate.json, has occurred - updating... (live nodes size: 1) 5227 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 2 5228 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 2 8229 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 3 8229 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 3 11232 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 4 11232 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 4 14237 [coreLoadExecutor-6-thread-1] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 5 14237 [coreLoadExecutor-6-thread-2] INFO org.apache.solr.cloud.ZkController – Could not find collection configName - pausing for 3 seconds and trying again - try: 5 17237 [coreLoadExecutor-6-thread-1] ERROR org.apache.solr.cloud.ZkController – Could not find configName for collection logmail 17238 [coreLoadExecutor-6-thread-2] ERROR org.apache.solr.cloud.ZkController – Could not find configName for collection collection1 17240 [coreLoadExecutor-6-thread-1] ERROR org.apache.solr.core.CoreContainer – Error creating core [logmail]: Could not find configName for collection logmail found:null org.apache.solr.common.cloud.ZooKeeperException: Could not find configName for collection logmail found:null

根据您的命令,Solr 在集合文件系统上的内容与 zookeeper 中的内容似乎存在差异。

这些很难修复;如果可能的话,我会建议从 zookeeper 中删除你的配置文件并重新加载它们。

您的命令有错别字。这应该可以解决问题:

$ java -Dcollection.configName=logmail -DzkRun -Dnumshards=2 -Dbootstrap_confdir=./solr/logmail/conf -jar start.jar