Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-36857

Reindex all fails with an com.atlassian.jira.index.IndexingFailureException using Java 7

    XMLWordPrintable

Details

    Description

      Summary

      Attempting to reindex JIRA fails with the below exception. This does not fail for all issues, only a couple. It also causes JIRA Agile's upgrade tasks to fail, as tracked in GHS-10348.

      Environment

      • Java 7

      Steps to Reproduce

      1. Restore an instance with problematic data.
      2. Install JIRA Agile and upgrade.

      Expected Results

      The reindex completes without error.

      Actual Results

      The below exception is thrown:

      2014-02-04 11:31:28,768 JiraTaskExectionThread-2 ERROR admin 685x278x1 o72kxu 127.0.0.1 /secure/admin/jira/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All FAILED.  Indexer: DefaultIndexManager: paths: [/Users/dcurrie/deployments/jira617/jira-home/caches/indexes/comments, /Users/dcurrie/deployments/jira617/jira-home/caches/indexes/issues, /Users/dcurrie/deployments/jira617/jira-home/caches/indexes/changes]
      com.atlassian.jira.index.IndexingFailureException: Indexing completed with 3 errors
      	at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:147)
      	at com.atlassian.jira.issue.index.DefaultIndexManager.doIndexIssuesInBatchMode(DefaultIndexManager.java:877)
      	at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:844)
      	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:307)
      	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:272)
      	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:267)  <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83)
      	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
      	at com.sun.proxy.$Proxy140.reIndexAll(Unknown Source)
      	at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:56)
      	at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:28)
      	at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:54)
      	at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.call(ReIndexAsyncIndexerCommand.java:16)
      	at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:23)
      	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:374)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250)
      	at java.lang.Thread.run(Thread.java:744)
      

      Tracking back into the logs reveals that exceptions were thrown during the indexing (the timestamp on this log is different however it's the same problem):

      2014-03-08 21:07:32,716 JiraTaskExectionThread-1 WARN captain.planet 1267x112x1 h86sjy 74.57.203.161,127.0.0.1 /secure/admin/IndexReIndex.jspa [atlassian.jira.index.AccumulatingResultBuilder] java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Comparison method violates its general contract!
      

      Notes

      It is important to note that indexing mostly finishes. It seems to fail for one or more issues that throws that exception.

      Solution

      Upgrade JIRA to 6.2.3+ using the instructions at Upgrading JIRA.

      Workaround

      1. Some customers have reported that reindexing has worked after upgrading to Java 1.7_u51. To check if this works for you, download the new Java and declare your JAVA_HOME variable in bin/setenv.bat (Windows) or bin/setenv.sh before you restart JIRA. Downtime is required to restart JIRA and re-index.
      2. Downgrade Java to 1.6, perform the index, then switch JIRA back to 1.7. We recommend to do this only do this if there is no other option. Switching to Java 6 will allow the issues to be indexed. Please note that Java 6 is not supported in later versions of JIRA as per Supported Platforms. Downtime is required for two JIRA restarts and an indexing.

      Attachments

        Issue Links

          Activity

            People

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              dcurrie@atlassian.com Dave C
              Votes:
              4 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: