You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Umesh Awasthi <um...@gmail.com> on 2014/09/10 14:45:41 UTC

Installing solr on tomcat 7.x | Window 8

I am trying to follow official document as well other resource available on
the net but unable to run solr on my tomcat.

I am trying to install and run `solr-4.10.0` on tomcat. this is what I have
done so far

 1. Copy solr-4.10.0.war to tomcat web-app and renamed it to solr.war.
 2. Created a folder in my `D` drive with name `solr-home`.
 3. copied everything from `solr-4.10.0\example\solr` and pasted it in
solr-home` folder.
 4. Through Environment variable , under user variable, I set following
path  `solr.solr.home=D:\solr-home`

Started tomcat server, it is starting without any error / exception, but
when I try to hit following URL `http://localhost:8080/solr/`, I am getting
following error

`message {msg=SolrCore 'collection1' is not available due to init failure:
Could not load conf for core collection1: Error loading solr config from
solr/collection1\solrconfig.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/collection1\solrconfig.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:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 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/collection1\solrconfig.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) ... 3 more Caused by:
org.apache.solr.common.SolrException: Error loading solr config from
solr/collection1\solrconfig.xml at
org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:148)
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 Files\Apache Software
Foundation\Tomcat 7.0\solr\collection1\conf' 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:116) at
org.apache.solr.core.Config.<init>(Config.java:86) at
org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:161) at
org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:144)
... 9 more ,code=500}`

I am not sure where I am doing wrong or is it so tricky to install `Solr`.

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: Installing solr on tomcat 7.x | Window 8

Posted by Shawn Heisey <so...@elyograg.org>.
On 9/10/2014 6:45 AM, Umesh Awasthi wrote:
> I am trying to follow official document as well other resource available on
> the net but unable to run solr on my tomcat.
> 
> I am trying to install and run `solr-4.10.0` on tomcat. this is what I have
> done so far
> 
>  1. Copy solr-4.10.0.war to tomcat web-app and renamed it to solr.war.
>  2. Created a folder in my `D` drive with name `solr-home`.
>  3. copied everything from `solr-4.10.0\example\solr` and pasted it in
> solr-home` folder.
>  4. Through Environment variable , under user variable, I set following
> path  `solr.solr.home=D:\solr-home`
> 
> Started tomcat server, it is starting without any error / exception, but
> when I try to hit following URL `http://localhost:8080/solr/`, I am getting
> following error
> 
> `message {msg=SolrCore 'collection1' is not available due to init failure:
> Could not load conf for core collection1: Error loading solr config from
> solr/collection1\solrconfig.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/collection1\solrconfig.xml at

The path in the error message is wrong.  See SOLR-5814.

https://issues.apache.org/jira/browse/SOLR-5814

Is there anything in the log before this message?  You will need to find
the actual solr logfile ... because you used tomcat and not the jetty
included with Solr, I cannot tell you where this logfile is, although if
you copied the logging jars and the logging config from the example, it
will be logs\solr.log, relative to the current working directory of the
process that started tomcat.

A side note:  Windows 8 is a client operating system.  Microsoft has
crippled their client operating systems in some way compared to their
server operating systems.  Heavy multi-threaded server workloads like
Solr will not work as well.  I don't know exactly what the differences are.

If you really want to run Solr on a Windows system, you really should
put it on Server 2012, not Windows 8.  Unfortunately, their server
operating systems have a rather high price tag.  It will be the opinion
of most people here that you and your pocketbook would be far happier
with the results of running on Linux -- better performance and no cost.

Thanks,
Shawn