關於 Apache Solr 無法啟動的問題
Apache Tomcat/8.0.15 ,
Solr 的版本是 4.10.2
我安裝 Solr 的方式如下:-------------------------------------------------------------------------------------------------------------------------------------------
將solr-4.7.1.zip 裡面的examplewebappssolr.war copy 到 tomcat的 webapps目錄下 ( 例: D:apache-tomcat-7.0.53webappssolr.war )
新增一個空白目錄來放 solr 將來產生出來的索引, ( 例: D:Folder_Index )
將solr-4.7.1.zip 裡面的examplesolr 下的檔案(含子目錄) 一併拷貝到剛才新開的索引目錄 ( 例: D:Folder_Index )
修改 tomcat 的啟動變數: 編輯 D:apache-tomcat-7.0.53bincatalina.bat , 在最上面加上這一行 set JAVA_OPTS=-Dsolr.solr.home=d:Folder_Index ,
再啟動一次 Tomcat: 執行 D:apache-tomcat-7.0.53binstartup.bat , 此時 solr.war 安裝包將會被安裝. Tomcat啟動完畢後把tomcat關閉.
tomcat 確認關閉後 , 檢視 tomcat 的目錄 D:apache-tomcat-7.0.53webapps ,確認有一個 solr 的目錄之後 .把 solr.war 安裝包刪除.
最後 copy 下列 lib 檔案
將solr-4.7.1.zip 裡面的 examplelibext*.* copy 到 D:apache-tomcat-7.0.53webappssolrWEB-INFlib
將solr-4.7.1.zip 裡面的 exampleresourceslog4j.properties copy 到 D:apache-tomcat-7.0.53lib
------------------------------------------------------------------------------------------------------------------------------------------
但是在瀏覽 solr 的頁面的時候卻會出現以下錯誤訊息:
HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure: Could not load conf for core collection1: Error loading solr config from solr/collection1confsolrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Could not load conf for core collection1: Error loading solr config from solr/collection1confsolrconfig.xml at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:745) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:307) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2407) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2396) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.common.SolrException: Could not load conf for core collection1: Error loading solr config from solr/collection1confsolrconfig.xml at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:66) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:489) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ... 1 more Caused by: org.apache.solr.common.SolrException: Error loading solr config from solr/collection1confsolrconfig.xml at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:154) at org.apache.solr.core.ConfigSetService.createSolrConfig(ConfigSetService.java:80) at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:61) ... 7 more Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'C:Program FilesApache Software FoundationTomcat 8.0solrcollection1conf' at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:362) at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:308) at org.apache.solr.core.Config.<init>(Config.java:117) at org.apache.solr.core.Config.<init>(Config.java:87) at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:167) at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:145) ... 9 more ,code=500}
------------------------------------------------------------------------------------------------------------------
有人知道該如何解決嗎?
感謝幫忙。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
inf里面的配置文件做修改指向solr的数据,之后复制example的两个依赖包文件到solr 数据文件夹
僵尸项目之前重新配置,solr3.6 ,我没有对tomcat做修改,放入war包之后直接吧web-