Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SolrCore 'collection1' is not available due to init failure..after editing files and granting permissions

Tags:

java

solr

tomcat

I am having this error since long time. Its about collection1. I have changed the permission , edited the solrconfig.xml but still no improve ment here is my status report

HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure: Could not load config file /var/lib/tomcat7/solr/collection1/solrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Could not load config file /var/lib/tomcat7/solr/collection1/solrconfig.xml at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:818) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:297) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:197) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/collection1/solrconfig.xml at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:525) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:592) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:271) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:263) 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 '/var/lib/tomcat7/solr/collection1/conf' at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:342) at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:288) at org.apache.solr.core.Config.(Config.java:116) at org.apache.solr.core.Config.(Config.java:86) at org.apache.solr.core.SolrConfig.(SolrConfig.java:129) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:522) ... 11 more ,code=500}

plz suggest me a solution... thanx in adavance

like image 447
yugal Avatar asked Dec 11 '13 06:12

yugal


3 Answers

Make sure the /var/lib/tomcat7/solr/ is the tomcat user.

sudo chown -R tomcat /var/lib/tomcat7/solr/

Then restart tomcat.

like image 111
Jeffrey Avatar answered Nov 09 '22 04:11

Jeffrey


I had the same issue, Issue occurred due to started tomcat as root user. solved it by restarting tomcat as the tomcat user.

like image 32
Praveen Ranjan Avatar answered Nov 09 '22 05:11

Praveen Ranjan


For me I have to update

vi $CATALINA_HOME/webapps/solr/WEB-INF/web.xml

Un-comment and update :

<env-entry>
   <env-entry-name>solr/home</env-entry-name>
   <env-entry-value>/opt/solr/example/solr</env-entry-value>
   <env-entry-type>java.lang.String</env-entry-type>
</env-entry>
like image 35
Nahid Avatar answered Nov 09 '22 03:11

Nahid