com.atlassian.jira.index.IndexingFailureException: Indexing completed with 2 errors

Atlassian JIRA | Tim Evans | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Description of Problem After restoring a Cloud backup to JIRA server, indexing failed with the following errors in atlassian-jira.log {noformat} 2016-08-19 21:18:10,996 JiraTaskExectionThread-3 WARN sysadmin 1277x313x1 v5jhvz 10.61.1.234 /secure/admin/jira/IndexReIndex.jspa [c.a.jira.index.AccumulatingResultB$ java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: shareType should not be null! at com.atlassian.jira.index.FutureResult.await(FutureResult.java:29) at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:140) at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndex(DefaultSharedEntityIndexManager.java:128) at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndexAll(DefaultSharedEntityIndexManager.java:83) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:64) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:48) at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:25) 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:24) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:453) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:421) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216) at java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.ExecutionException: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: shareType should not be null! at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) ... 2016-08-19 19:07:19,414 JiraImportTaskExecutionThread-1 ERROR sysadmin 1144x114x1 1mg9eth 10.60.2.234 /secure/admin/XmlRestor$ com.atlassian.jira.index.IndexingFailureException: Indexing completed with 2 errors at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:150) at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndex(DefaultSharedEntityIndexManager.java:1$ at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndexAll(DefaultSharedEntityIndexManager.jav$ at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.reIndexAll(DefaultSharedEntityIndexManager.jav$ at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.activate(DefaultSharedEntityIndexManager.java:$ at com.atlassian.jira.sharing.index.DefaultSharedEntityIndexManager.activate(DefaultSharedEntityIndexManager.java:$ at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.activate(CompositeIndexLifecycleManager.java:134) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.activate(CompositeIndexLifecycleManager.java:128) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.reindex(DefaultDataImportService.java:955) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:749) at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:320) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60) at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157) at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) {noformat} h3. Cause In Cloud versions, there is a new Share Type for filters for any logged in User. This value translates to "loggedin" in thesharepermissions table. Unfortunately, this value does not exist for JIRA Server, and it is interpreted as being null on the table. h3. Expected Behavior Indexing does not fail after restore from JIRA Cloud. * One solution might be to fix this value during the XML restore process h3. Workaround # Stop JIRA # Run this database query: {{update sharepermissions set sharetype = 'global' where sharetype = 'loggedin';}} # Start JIRA # Run a lock index to re-build the indexes.

    Atlassian JIRA | 7 months ago | Tim Evans
    com.atlassian.jira.index.IndexingFailureException: Indexing completed with 2 errors
  2. 0

    [JRA-37256] Reindexing fails: Cannot invoke method getValidators() on null object - Atlassian JIRA

    atlassian.com | 1 year ago
    com.atlassian.jira.index.IndexingFailureException: Indexing completed with 12256 errors
  3. 0

    [JMCF-165] Reindexing in JIRA fails with errors - JIRA

    atlassian.net | 2 years ago
    com.atlassian.jira.index.IndexingFailureException: Indexing completed with 5 errors
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JRA-36857] Reindex all fails with an com.atlassian.jira.index.IndexingFailureException using Java 7 - Atlassian JIRA

    atlassian.com | 1 year ago
    com.atlassian.jira.index.IndexingFailureException: Indexing completed with 3 errors
  6. 0

    h3. 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. h3. Environment * Java 7 h3. Steps to Reproduce # Restore an instance with problematic data. # Install JIRA Agile and upgrade. h3. Expected Results The reindex completes without error. h3. Actual Results The below exception is thrown: {noformat} 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) {noformat} 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): {noformat} 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! {noformat} h3. Notes It is important to note that indexing _mostly_ finishes. It seems to fail for one or more issues that throws that exception. h3.Solution Upgrade JIRA to 6.2.3+ using the instructions at [Upgrading JIRA|https://confluence.atlassian.com/display/JIRA/Upgrading+JIRA]. h3. Workaround # 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. # 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|http://confluence.atlassian.com/display/JIRA/Supported+Platforms]. Downtime is required for two JIRA restarts and an indexing.

    Atlassian JIRA | 3 years ago | David Currie [Atlassian]
    com.atlassian.jira.index.IndexingFailureException: Indexing completed with 3 errors

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.jira.index.IndexingFailureException

      Indexing completed with 2 errors

      at com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await()
    2. com.atlassian.jira
      AccumulatingResultBuilder$CompositeResult.await
      1. com.atlassian.jira.index.AccumulatingResultBuilder$CompositeResult.await(AccumulatingResultBuilder.java:150)
      1 frame