Solr-集合创建错误:找不到资源“ solrconfig.xml”

时间:2018-07-21 16:34:14

标签: solr solrcloud

我在32个linux节点/服务器(+承载ZooKeeper的节点)的群集上运行Solr-7.2.1。我想使用以下命令创建一个集合:

[solr@node-n03 solr]$ curl "node-n03:8983/solr/admin/collections?action=CREATE&name=web&numShards=32&replicationFactor=1&maxShardsPerNode=1&collection.configName=web"

在使用以下命令将配置上传到ZooKeeper之前:

./server/scripts/cloud-scripts/zkcli.sh -zkhost node-n01:2181 -cmd upconfig -confname web -confdir /share/solr-7.2.1/server/configs/web

但是,我遇到此错误:

    {
  "responseHeader":{
    "status":0,
    "QTime":32675},
  "failure":{
    "IP.IP.IP.56:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.56:8983/solr: Error CREATEing SolrCore 'web_shard13_replica_n24': Unable to create core [web_shard13_replica_n24] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.62:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.62:8983/solr: Error CREATEing SolrCore 'web_shard31_replica_n60': Unable to create core [web_shard31_replica_n60] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.106:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.106:8983/solr: Error CREATEing SolrCore 'web_shard4_replica_n6': Unable to create core [web_shard4_replica_n6] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.69:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.69:8983/solr: Error CREATEing SolrCore 'web_shard1_replica_n1': Unable to create core [web_shard1_replica_n1] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.66:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.66:8983/solr: Error CREATEing SolrCore 'web_shard8_replica_n14': Unable to create core [web_shard8_replica_n14] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.61:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.61:8983/solr: Error CREATEing SolrCore 'web_shard3_replica_n4': Unable to create core [web_shard3_replica_n4] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.104:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.104:8983/solr: Error CREATEing SolrCore 'web_shard15_replica_n28': Unable to create core [web_shard15_replica_n28] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.107:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.107:8983/solr: Error CREATEing SolrCore 'web_shard12_replica_n22': Unable to create core [web_shard12_replica_n22] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.109:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.109:8983/solr: Error CREATEing SolrCore 'web_shard23_replica_n44': Unable to create core [web_shard23_replica_n44] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.68:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.68:8983/solr: Error CREATEing SolrCore 'web_shard18_replica_n34': Unable to create core [web_shard18_replica_n34] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.90:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.90:8983/solr: Error CREATEing SolrCore 'web_shard19_replica_n36': Unable to create core [web_shard19_replica_n36] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.63:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.63:8983/solr: Error CREATEing SolrCore 'web_shard27_replica_n52': Unable to create core [web_shard27_replica_n52] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.96:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.96:8983/solr: Error CREATEing SolrCore 'web_shard20_replica_n38': Unable to create core [web_shard20_replica_n38] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.57:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.57:8983/solr: Error CREATEing SolrCore 'web_shard2_replica_n2': Unable to create core [web_shard2_replica_n2] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.55:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.55:8983/solr: Error CREATEing SolrCore 'web_shard16_replica_n30': Unable to create core [web_shard16_replica_n30] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.95:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.95:8983/solr: Error CREATEing SolrCore 'web_shard28_replica_n54': Unable to create core [web_shard28_replica_n54] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.108:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.108:8983/solr: Error CREATEing SolrCore 'web_shard22_replica_n42': Unable to create core [web_shard22_replica_n42] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.94:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.94:8983/solr: Error CREATEing SolrCore 'web_shard25_replica_n48': Unable to create core [web_shard25_replica_n48] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.58:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.58:8983/solr: Error CREATEing SolrCore 'web_shard14_replica_n26': Unable to create core [web_shard14_replica_n26] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.105:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.105:8983/solr: Error CREATEing SolrCore 'web_shard24_replica_n46': Unable to create core [web_shard24_replica_n46] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.73:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.73:8983/solr: Error CREATEing SolrCore 'web_shard32_replica_n62': Unable to create core [web_shard32_replica_n62] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.74:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.74:8983/solr: Error CREATEing SolrCore 'web_shard17_replica_n32': Unable to create core [web_shard17_replica_n32] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.59:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.59:8983/solr: Error CREATEing SolrCore 'web_shard21_replica_n40': Unable to create core [web_shard21_replica_n40] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.102:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.102:8983/solr: Error CREATEing SolrCore 'web_shard30_replica_n58': Unable to create core [web_shard30_replica_n58] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.111:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.111:8983/solr: Error CREATEing SolrCore 'web_shard29_replica_n56': Unable to create core [web_shard29_replica_n56] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.67:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.67:8983/solr: Error CREATEing SolrCore 'web_shard5_replica_n8': Unable to create core [web_shard5_replica_n8] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.60:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.60:8983/solr: Error CREATEing SolrCore 'web_shard9_replica_n16': Unable to create core [web_shard9_replica_n16] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.70:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.70:8983/solr: Error CREATEing SolrCore 'web_shard11_replica_n20': Unable to create core [web_shard11_replica_n20] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.110:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.110:8983/solr: Error CREATEing SolrCore 'web_shard7_replica_n12': Unable to create core [web_shard7_replica_n12] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.103:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.103:8983/solr: Error CREATEing SolrCore 'web_shard6_replica_n10': Unable to create core [web_shard6_replica_n10] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.97:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.97:8983/solr: Error CREATEing SolrCore 'web_shard10_replica_n18': Unable to create core [web_shard10_replica_n18] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server",
    "IP.IP.IP.77:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://IP.IP.IP.77:8983/solr: Error CREATEing SolrCore 'web_shard26_replica_n50': Unable to create core [web_shard26_replica_n50] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/configs/web', cwd=/share/solr-7.2.1/server"}}

当我查看/share/solr-7.2.1/server/configs/web时,该文件夹存在。 我将权限更改为777,以避免出现任何权限问题,但这并不能解决问题。

关于我在这里缺少什么的任何提示吗?!


更新: 如果我使用其他配置,则一切正常:

[solr@node-n03 solr]$ curl "node-n03:8983/solr/admin/collections?action=CREATE&name=web&numShards=32&replicationFactor=1&maxShardsPerNode=1&collection.configName=techproducts"

我还在每个节点上创建了目录/ configs(如错误所示),并复制了我想用于覆盖该目录的'web'configset文件(/ share / solr / server / solr / web)集合默认配置。但是,这并不能解决问题。

因此,问题出在我正在使用的新配置上,但无法弄清楚Solr到底希望将solrconfig.xml文件放在何处以及为什么看不到它!

schema.xml是:

<schema>
<field name="id" type="string" indexed="true" stored="false"/>
   <field name="url" type="string" indexed="true" stored="false"/>
   <field name="text" type="mod" indexed="true" stored="false"/>

    <fieldType name="mod" class="solr.TextField" indexed="true" stored="false" >
        <analyzer type="query">
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
                <filter class="solr.LowerCaseFilterFactory"/>
                <filter class="solr.PorterStemFilterFactory"/>
        </analyzer>
        <analyzer type="query">
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
                <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
                <filter class="solr.LowerCaseFilterFactory"/>
                <filter class="solr.PorterStemFilterFactory"/>
        </analyzer>
    </fieldType>
</schema>

1 个答案:

答案 0 :(得分:1)

解决方案非常简单,如下所示: “ solrconfig.xml”文件位于@ /server/solr/web/conf/solrconfig.xml 我必须将其移至/server/solr/web/,然后上传至ZooKeeper