gpt4 book ai didi

solr - Tomcat6升级到Tomcat8后报错: Could not load config for solrconfig. xml

转载 作者:行者123 更新时间:2023-12-01 13:36:18 42 4
gpt4 key购买 nike

我在 Ubuntu 12.04 Tomcat6 上运行 Solr;我们升级到 16.04 和 Tomcat8,Solr 停止读取一些索引。我相信唯一受影响的索引是配置目录被软链接(soft link)的索引。后来谷歌搜索了一下,我发现 allowLinking 属性被移动了。这是我的旧配置:

<!-- /etc/tomcat6/Catalina/localhost/solr.xml -->
<Context path="/solr" docBase="/usr/share/solr"
debug="0" privileged="true" allowLinking="true" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/usr/share/solr" override="true" />
</Context>

我改写为:

<!-- /etc/tomcat8/Catalina/localhost/solr.xml -->
<Context path="/solr" docBase="/usr/share/solr"
privileged="true" crossContext="true">
<Resources allowLinking="true" />
<Environment name="solr/home" type="java.lang.String" value="/usr/share/solr" override="true" />
</Context>

甚至在全局范围内尝试过:

<!-- /etc/tomcat8/context.xml -->
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resources allowLinking="true"/>
</Context>

但我无法让 Solr 加载这些内核。 /var/log/tomcat8/catalina.out错误如下:

3 27, 2017 2:22:33 午後 org.apache.solr.core.CoreContainer recordAndThrow
重大: Unable to create core: blacklight-core
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:973)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1033)
at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:624)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or '/disks/disk00/solr/library/blacklight-core/conf/', cwd=/var/lib/tomcat8
at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:316)
at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:281)
at org.apache.solr.core.Config.<init>(Config.java:103)
at org.apache.solr.core.Config.<init>(Config.java:73)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:971)
... 9 more

(午后表示“下午”,“重大”表示“严重”)

最佳答案

愚蠢的问题,愚蠢的答案。

Tomcat 6 在 tomcat6 组下运行。 Tomcat 8 作为 tomcat8 运行。

我的文件是 -rw-rw---- amadan:tomcat6

解决方案:chgrp -R tomcat8/disks/disk00/solr/

关于solr - Tomcat6升级到Tomcat8后报错: Could not load config for solrconfig. xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43038642/

42 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com