gpt4 book ai didi

solr - java.lang.IllegalStateException : Cannot call sendError() after the response has been committed

转载 作者:行者123 更新时间:2023-12-04 12:47:48 26 4
gpt4 key购买 nike

我正在将大约 3 TB 的数据索引到 apache solr 中。当数据大小达到 14 GB 时,我的 tomcat 日志中出现以下错误。是否可以对其进行故障排除?我打算稍后将我的索引移动到 solr cloud。

> SEVERE: Servlet.service() for servlet [default] in context with path
> [/solr] threw exception java.lang.IllegalStateException: Cannot call
> sendError() after the response has been committed
> at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:451)
> at org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:757)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:438)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:201)
> 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$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)

最佳答案

当 Solr 开始写入响应然后抛出异常时,就会发生这种情况。然后在尝试处理该异常时,它又抛出了另一个异常。 Solr在这种情况下的退路基本上是举手叫HttpServletResponse#sendError() , 抛出 IllegalStateException因为 Solr 已经写了部分响应。作为副作用,原始异常丢失了。万岁!

如果幸运的话,其他一些组件会在将异常抛出堆栈之前记录该异常。在这种情况下,此错误的实际原因将出现在 IllegalStateException 之前不久的日志中。 .否则是时候在 SolrDispatchFilter#sendError() 内设置断点了并在 Solr 吞下它之前查看异常。

关于solr - java.lang.IllegalStateException : Cannot call sendError() after the response has been committed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21807877/

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