0
votes

I'm new to solr and I'm having some problems and was wondering if anyone can help me out.

I followed this: http://crazorsharp.blogspot.com/2010/01/full-text-search-using-solr-lucene-and.html

I downloaded: Apache Tomcat/8.0.0-RC5 and Solr version 4.5.1 was downloaded

If I try http://localhost:8983 I get the Apache Tomcat webpage but if I try http://localhost:8983/solr I receive this error:

HTTP Status 404 - /solr

type Status report

message /solr

description The requested resource is not available.

Apache Tomcat/8.0.0-RC5

Some other People reported this error and these seemed to have fixed it by adding:

<env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>c:/solr</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>

This has not worked for me :(

Any idea please?

BTW:

In logs I'm getting these errors:
03-Nov-2013 21:18:26.623 INFO [http-apr-8983-exec-20] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\solr.xml
03-Nov-2013 21:18:26.628 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/solrcloud/str'.
03-Nov-2013 21:18:26.628 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/solrcloud/int'.
03-Nov-2013 21:18:26.629 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/solrcloud/str'.
03-Nov-2013 21:18:26.629 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/solrcloud/int'.
03-Nov-2013 21:18:26.629 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/solrcloud/bool'.
03-Nov-2013 21:18:26.629 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/solrcloud'.
03-Nov-2013 21:18:26.629 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/shardHandlerFactory/int'.
03-Nov-2013 21:18:26.629 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/shardHandlerFactory/int'.
03-Nov-2013 21:18:26.630 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/shardHandlerFactory'.
03-Nov-2013 21:18:26.630 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/Context/Environment'.
03-Nov-2013 21:18:26.630 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr/Context'.
03-Nov-2013 21:18:26.630 WARNING [http-apr-8983-exec-20] org.apache.tomcat.util.digester.Digester.endElement   No rules found matching 'solr'.
03-Nov-2013 21:18:27.456 SEVERE [http-apr-8983-exec-20] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [/solr]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:574)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:450)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1534)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1430)
    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:306)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:214)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:616)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:76)
    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:515)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1012)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:642)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:282)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2461)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2450)
    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.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/solr] Context cannot be started.
    at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:198)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 45 more

03-Nov-2013 21:18:27.457 SEVERE [http-apr-8983-exec-20] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\solr.xml
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/solr]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:574)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:450)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1534)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1430)
    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:306)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:214)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:616)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:76)
    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:515)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1012)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:642)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:282)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2461)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2450)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

03-Nov-2013 21:18:33.987 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.reload Reloading context [/Solr]
03-Nov-2013 21:18:35.422 WARNING [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.reload Error during context [/Solr] restart
 org.apache.catalina.LifecycleException: Failed to start component [/Solr]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1350)
    at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1277)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1512)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:274)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1143)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1358)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1362)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1336)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to process either the global, per-host or context-specific context.xml file therefore the [/Solr] Context cannot be started.
    at org.apache.catalina.startup.FailedContext.startInternal(FailedContext.java:198)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more
1
If you're new to Solr try the included Jetty container first.Mauricio Scheffer
@MauricioScheffer: I have had some issues with Solr in Jetty under load, but it is good start for try Solr.Nikolay
Looking at the logs it looks like that the C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\solr.xml is an solr.xml file containing solr settings (e.g. cloud,sharding,etc.). Please, edit the C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\solr.xml file, and replace all the content with what @Nikolay provided in the answer. That should fix at least the issue which is reflected in the logs.rchukh

1 Answers

0
votes

Rename solr-xxx.war to solr.war and place it to Tomcat's webapps folder. Also ensure you have correct config in solr/home directory.

My solr.xml:

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="c:/solr/solr.war" debug="0" crossContext="true">
    <Environment name="solr/home" type="java.lang.String" value="c:/solr/" override="true"/>
</Context>