我对 Solr 有一点问题。我想在tomcat环境中启动应用程序。我尝试了不同的教程,但没有任何效果。
我已经使用 Tomcat Web 应用程序管理器打开了 solr.war 文件。在我看来,这与将war文件复制到tomcat目录的webapp文件夹中是一样的。应用程序已成功加载!当我转到 localhost:8080/solr/ 时,我得到了一些错误。
在我看来,某些配置文件中缺少路径,但我不知道是哪一个。
HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure:
Could not load config for solrconfig.xml,trace=org.apache.solr.common.SolrException:
SolrCore 'collection1' is not available due to init failure: Could not load config for
solrconfig.xml at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.jav
a:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:223) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:75) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:934) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:90) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:494) at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:
632) at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtoco
l.java:281) at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2248) at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2237) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at
java.lang.Thread.run(Thread.java:724) Caused by: org.apache.solr.common.SolrException:
Could not load config for solrconfig.xml at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:592) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:657) at
org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364) at
org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at
java.util.concurrent.FutureTask.run(FutureTask.java:166) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at
java.util.concurrent.FutureTask.run(FutureTask.java:166) ... 3 more Caused by:
java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'C:solrsolr-
multicore\collection1\conf/', cwd=D:\Suchmaschine\Tomcat\Software\apache-tomcat-8.0.0-RC1-
windows-x64\apache-tomcat-8.0.0-RC1\bin at
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:322) at
org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:287) at
org.apache.solr.core.Config.<init>(Config.java:116) at org.apache.solr.core.Config.<init>
(Config.java:86) at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:120) at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:589) ... 11 more
,code=500}