Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Component/s: UI
    • Labels:
      None
    • Environment:
      Nexus 1.8.0, Linux, Tomcat6, JDK 6
    • Global Rank:
      5954

      Description

      see sceenshot

      nexus.log:
      2010-10-14 19:33:27 ERROR [http-8080-7 ] - o.s.n.s.f.a.NexusSe~ - Unable to login
      org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed
      at org.apache.lucene.index.DocumentsWriter.waitReady(DocumentsWriter.java:849)
      at org.apache.lucene.index.DocumentsWriter.getThreadState(DocumentsWriter.java:689)
      at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:755)
      at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:743)
      at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1917)
      at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1895)
      at org.sonatype.timeline.DefaultTimelineIndexer.add(DefaultTimelineIndexer.java:210)
      at org.sonatype.timeline.DefaultTimeline.add(DefaultTimeline.java:99)
      at org.sonatype.nexus.timeline.DefaultNexusTimeline.add(DefaultNexusTimeline.java:127)
      at org.sonatype.nexus.feeds.DefaultFeedRecorder.addToTimeline(DefaultFeedRecorder.java:518)
      at org.sonatype.nexus.feeds.DefaultFeedRecorder.addAuthcAuthzEvent(DefaultFeedRecorder.java:442)
      at org.sonatype.nexus.DefaultNexus.addAuthcAuthzEvent(DefaultNexus.java:500)
      at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.recordAuthcEvent(NexusHttpAuthenticationFilter.java:296)
      at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.onLoginSuccess(NexusHttpAuthenticationFilter.java:249)
      at org.jsecurity.web.filter.authc.AuthenticatingFilter.executeLogin(AuthenticatingFilter.java:50)
      at org.sonatype.nexus.security.filter.authc.NexusHttpAuthenticationFilter.onAccessDenied(NexusHttpAuthenticationFilter.java:129)
      at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:145)
      at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:175)
      at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129)
      at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
      at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
      at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
      at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)

        Activity

        Hide
        Rich Seddon added a comment -

        We will fix this in 1.9. This should be a rare intermittent problem. Is this the case, or are you seeing this a lot?

        Show
        Rich Seddon added a comment - We will fix this in 1.9. This should be a rare intermittent problem. Is this the case, or are you seeing this a lot?
        Hide
        Peter Lynch added a comment -

        Repro Note:

        Make Lucene index corrupt and try to login

        Show
        Peter Lynch added a comment - Repro Note: Make Lucene index corrupt and try to login
        Hide
        Damian Bradicich added a comment -

        merged back to 1.8.0.1 branch

        Show
        Damian Bradicich added a comment - merged back to 1.8.0.1 branch
        Hide
        Peter Lynch added a comment -

        I spent considerable time trying to repro this on 1.8.0 - 1.9-SNAPSHOT, I cannot.

        It should be very rare. I made index corrupt and everytime Nexus detected and repaired automatically. I changed timeline and timeline/index dir perms so that Nexus could not read write to the index and was still able to login. The worst I get is a WARN about not being able to write to the index.

        I will note that if timeline dir cannot be written too before Nexus is successfully started then Nexus will start and return http code 503 for all requests.

        I will mark as fixed instead of cannot reproduce because there were code changes implemented to help prevent the original error - and we did see the error at one point.

        Show
        Peter Lynch added a comment - I spent considerable time trying to repro this on 1.8.0 - 1.9-SNAPSHOT, I cannot. It should be very rare. I made index corrupt and everytime Nexus detected and repaired automatically. I changed timeline and timeline/index dir perms so that Nexus could not read write to the index and was still able to login. The worst I get is a WARN about not being able to write to the index. I will note that if timeline dir cannot be written too before Nexus is successfully started then Nexus will start and return http code 503 for all requests. I will mark as fixed instead of cannot reproduce because there were code changes implemented to help prevent the original error - and we did see the error at one point.
        Hide
        Marc Lustig added a comment - - edited

        we just got the same error again, still running 1.8.0
        any way to fix this, perhaps by deleting the lucene index? how to do this?
        restarting tomcat did not solve this.

        Show
        Marc Lustig added a comment - - edited we just got the same error again, still running 1.8.0 any way to fix this, perhaps by deleting the lucene index? how to do this? restarting tomcat did not solve this.
        Hide
        Marc Lustig added a comment -

        I solved this by deleting sonatype-work/nexus/timeline/index/*

        Show
        Marc Lustig added a comment - I solved this by deleting sonatype-work/nexus/timeline/index/*
        Hide
        Artem Shnayder added a comment -

        Thanks Marc, that worked for us too.

        Show
        Artem Shnayder added a comment - Thanks Marc, that worked for us too.
        Hide
        Tamás Cservenák added a comment -

        Yes, this is the "timeline" Lucene index (see here for Nexus work directories) being corrupted somehow. Again, this is NOT repository index.

        What happened in 1.8 is that "timeline" was maintained in same execution path as login was happening, and in case of Lucene index corruption, the whole process was booted and reported as "Server Internal Error" preventing logins and pretty much every interaction against server.

        The only known fix for 1.8 line is what Marc did: nuke the timeline index.

        In 1.9, major change happened and Nexus is made more robust (but also Timeline is fixed to make it's best to prevent situations like these), and timeline/lucene index errors are not interfering with execution paths from now on.

        Show
        Tamás Cservenák added a comment - Yes, this is the "timeline" Lucene index (see here for Nexus work directories ) being corrupted somehow. Again, this is NOT repository index. What happened in 1.8 is that "timeline" was maintained in same execution path as login was happening, and in case of Lucene index corruption, the whole process was booted and reported as "Server Internal Error" preventing logins and pretty much every interaction against server. The only known fix for 1.8 line is what Marc did: nuke the timeline index. In 1.9, major change happened and Nexus is made more robust (but also Timeline is fixed to make it's best to prevent situations like these), and timeline/lucene index errors are not interfering with execution paths from now on.

          People

          • Assignee:
            Peter Lynch
            Reporter:
            Marc Lustig
            Last Updated By:
            Rich Seddon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: