5

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

1
  • 1
    First look into your tomcat logs, see if there is a very specific error why init failed. In your exception it says "Can't find resource 'solrconfig.xml' in classpath or '/var/lib/tomcat7/solr/collection1/conf'" did you go to /var/lib/tomcat7/solr/collection1/conf and check if you have your solrconfig.xml ? Check your setenv.bat/sh file of tomcat to see if you have right path for your solr? check what is set for -Dsolr.data.dir= and make sure the solrhome is set correct oneway or the other. Look here for more info on this : wiki.apache.org/solr/SolrTomcat
    – Arun
    Dec 11, 2013 at 13:50

6 Answers 6

5

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

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

Then restart tomcat.

3

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

1

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>
0

I had a similar error message and found (finally) in catalina.(date).log the following message:

"SEVERE: Environmental entry solr/home has an invalid type"

I had an error in /etc/tomcat7/Catalina/localhost/solr.xml where I had written: type="java.lang.string" <- WRONG, and I had to CORRECT -> "java.lang.String"

Your typing is probably better than mine but something to keep in mind when all your permissions, etc. are set correctly.

0

Please make sure that you have correctly defined your solr.solr.home variable. It should point to your solr indexer. If you are not using this variable make sure the path to solrconfig.xml is in the PATH variable

-1

I had the same issue, and solved it by restarting tomcat as the tomcat user (I started it with root when I got the error):

sudo -u tomcat /opt/tomcat/bin/startup.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.