首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Solr -集合创建的错误:找不到资源'solrconfig.xml‘

Solr -集合创建的错误:找不到资源'solrconfig.xml‘
EN

Stack Overflow用户
提问于 2018-07-21 16:34:13
回答 1查看 3.3K关注 0票数 0

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

代码语言:javascript
复制
[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:

代码语言:javascript
复制
./server/scripts/cloud-scripts/zkcli.sh -zkhost node-n01:2181 -cmd upconfig -confname web -confdir /share/solr-7.2.1/server/configs/web

但是,我得到了这个错误:

代码语言:javascript
复制
    {
  "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,但这并没有解决问题。

我有什么线索吗?!

更新:--如果我使用不同的配置,一切都很好:

代码语言:javascript
复制
[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是:

代码语言:javascript
复制
<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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-22 07:35:53

解决方案如下:“solrconfig.xml”文件位于@ /server/solr/web/conf/solrconfig.xml,我必须将其移动到/server/solr/web/,然后上传到ZooKeeper

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51458097

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档