gpt4 book ai didi

apache - 在 localhost 中尝试 solr 时出错

转载 作者:行者123 更新时间:2023-11-28 23:40:56 29 4
gpt4 key购买 nike

我是 solr 的新手,我遇到了一些问题,想知道是否有人可以帮助我。

我关注了这个:http://crazorsharp.blogspot.com/2010/01/full-text-search-using-solr-lucene-and.html

我下载的是:Apache Tomcat/8.0.0-RC5并下载了 Solr 版本 4.5.1

如果我尝试 http://localhost:8983 我会得到 Apache Tomcat 网页但是如果我尝试 http://localhost:8983/solr 我会收到这个错误:

HTTP Status 404 - /solr

type Status report

message /solr

description The requested resource is not available.

Apache Tomcat/8.0.0-RC5

一些其他人报告了这个错误,他们似乎通过添加修复了它:

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

这对我没用:(

有什么想法吗?

顺便说一句:

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

最佳答案

solr-xxx.war 重命名为solr.war 并将其放置到Tomcat 的webapps 文件夹中。还要确保您在 solr/home 目录中有正确的配置。

我的 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>

关于apache - 在 localhost 中尝试 solr 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19756651/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com