Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4668

Request for core status during core reload causes 500 error due to IndexWriter AlreadyClosedException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4, 7.0
    • Component/s: None
    • Labels:
      None

      Description

      Noticed this probably while experimenting with some new tests in SOLR-4629. While looping over requests to "/admin/cores?action=status", a corereload (in this case triggered by replicating config files, but i don't think thta matters) can cause a 500 error.

        Issue Links

          Activity

          Hide
          hossman Hoss Man added a comment -

          Example stack trace...

          [junit4:junit4]   1> ERROR - 2013-04-03 15:50:35.294; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Error handling 'status' action 
          [junit4:junit4]   1> 	at org.apache.solr.handler.admin.CoreAdminHandler.handleStatusAction(CoreAdminHandler.java:670)
          [junit4:junit4]   1> 	at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:156)
          [junit4:junit4]   1> 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
          [junit4:junit4]   1> 	at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:591)
          [junit4:junit4]   1> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:192)
          [junit4:junit4]   1> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141)
          [junit4:junit4]   1> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
          [junit4:junit4]   1> 	at org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:135)
          [junit4:junit4]   1> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
          [junit4:junit4]   1> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.handler.GzipHandler.handle(GzipHandler.java:275)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1074)
          [junit4:junit4]   1> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.Server.handle(Server.java:365)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
          [junit4:junit4]   1> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
          [junit4:junit4]   1> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
          [junit4:junit4]   1> 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
          [junit4:junit4]   1> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
          [junit4:junit4]   1> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
          [junit4:junit4]   1> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
          [junit4:junit4]   1> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
          [junit4:junit4]   1> 	at java.lang.Thread.run(Thread.java:722)
          [junit4:junit4]   1> Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
          [junit4:junit4]   1> 	at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:581)
          [junit4:junit4]   1> 	at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:595)
          [junit4:junit4]   1> 	at org.apache.lucene.index.IndexWriter.nrtIsCurrent(IndexWriter.java:4103)
          [junit4:junit4]   1> 	at org.apache.lucene.index.StandardDirectoryReader.isCurrent(StandardDirectoryReader.java:331)
          [junit4:junit4]   1> 	at org.apache.solr.handler.admin.LukeRequestHandler.getIndexInfo(LukeRequestHandler.java:561)
          [junit4:junit4]   1> 	at org.apache.solr.handler.admin.CoreAdminHandler.getCoreStatus(CoreAdminHandler.java:990)
          [junit4:junit4]   1> 	at org.apache.solr.handler.admin.CoreAdminHandler.handleStatusAction(CoreAdminHandler.java:664)
          [junit4:junit4]   1> 	... 30 more
          [junit4:junit4]   1> 
          
          Show
          hossman Hoss Man added a comment - Example stack trace... [junit4:junit4] 1> ERROR - 2013-04-03 15:50:35.294; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Error handling 'status' action [junit4:junit4] 1> at org.apache.solr.handler.admin.CoreAdminHandler.handleStatusAction(CoreAdminHandler.java:670) [junit4:junit4] 1> at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:156) [junit4:junit4] 1> at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) [junit4:junit4] 1> at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:591) [junit4:junit4] 1> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:192) [junit4:junit4] 1> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:141) [junit4:junit4] 1> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) [junit4:junit4] 1> at org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:135) [junit4:junit4] 1> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) [junit4:junit4] 1> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) [junit4:junit4] 1> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) [junit4:junit4] 1> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [junit4:junit4] 1> at org.eclipse.jetty.server.handler.GzipHandler.handle(GzipHandler.java:275) [junit4:junit4] 1> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1074) [junit4:junit4] 1> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) [junit4:junit4] 1> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) [junit4:junit4] 1> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) [junit4:junit4] 1> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [junit4:junit4] 1> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [junit4:junit4] 1> at org.eclipse.jetty.server.Server.handle(Server.java:365) [junit4:junit4] 1> at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) [junit4:junit4] 1> at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926) [junit4:junit4] 1> at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988) [junit4:junit4] 1> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635) [junit4:junit4] 1> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [junit4:junit4] 1> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [junit4:junit4] 1> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) [junit4:junit4] 1> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [junit4:junit4] 1> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [junit4:junit4] 1> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [junit4:junit4] 1> at java.lang.Thread.run(Thread.java:722) [junit4:junit4] 1> Caused by: org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed [junit4:junit4] 1> at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:581) [junit4:junit4] 1> at org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:595) [junit4:junit4] 1> at org.apache.lucene.index.IndexWriter.nrtIsCurrent(IndexWriter.java:4103) [junit4:junit4] 1> at org.apache.lucene.index.StandardDirectoryReader.isCurrent(StandardDirectoryReader.java:331) [junit4:junit4] 1> at org.apache.solr.handler.admin.LukeRequestHandler.getIndexInfo(LukeRequestHandler.java:561) [junit4:junit4] 1> at org.apache.solr.handler.admin.CoreAdminHandler.getCoreStatus(CoreAdminHandler.java:990) [junit4:junit4] 1> at org.apache.solr.handler.admin.CoreAdminHandler.handleStatusAction(CoreAdminHandler.java:664) [junit4:junit4] 1> ... 30 more [junit4:junit4] 1>
          Hide
          markrmiller@gmail.com Mark Miller added a comment -

          Bummer - was hoping some recent changes in 2.1 would solve this type of thing.

          Show
          markrmiller@gmail.com Mark Miller added a comment - Bummer - was hoping some recent changes in 2.1 would solve this type of thing.
          Hide
          mkhludnev Mikhail Khludnev added a comment -

          resolving as a twin of SOLR-9699

          Show
          mkhludnev Mikhail Khludnev added a comment - resolving as a twin of SOLR-9699

            People

            • Assignee:
              mkhludnev Mikhail Khludnev
              Reporter:
              hossman Hoss Man
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development