Attempting a Re-Index Fails with an Error Stating 'Cannot specify both grouplevel and rolelevel comment visibility'

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Attempting a re-index fails with the following errors:

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Cannot specify both grouplevel and rolelevel comment visibility
Task completed in 1 minute, 25 seconds with unexpected error.
Started Today 07:58 AM.
Finished Today 07:59 AM.
com.atlassian.jira.issue.index.DefaultIndexManager$RuntimeExecutionException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Cannot specify both grouplevel and rolelevel comment visibility
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:248)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70)
	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
	at $Proxy57.reIndexAll(Unknown Source)
	at com.atlassian.jira.util.index.IndexLifecycleManager$Composite.reIndexAll(IndexLifecycleManager.java:113)
	at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:30)
	at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:55)
	at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:24)
	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:338)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250)
	at java.lang.Thread.run(Thread.java:619)

Cause

The JIRA index is corrupt.

Resolution

The re-indexing errors can be resolved by following these steps:

  1. Sign into JIRA as an administrator and locate your index path (Administration >> System >> Indexing). In version 4.0 and later, the index directory is contained within the JIRA Home directory, which is specified in <jira-install>/atlassian-jira/WEB-INF/classes/jira-application.properties.
  2. Shutdown JIRA.
  3. Navigate to your index path and move the folder to another directory to keep as a backup (for example, if the default folder was /JIRAHome/caches/indexes, move the entire indexes folder to /JIRAHome/caches/indexes_old).
  4. Start JIRA.
  5. Attempt a re-index.

    Re-indexing may take a while, as all data must be indexed. JIRA will not be available for use during the indexing process!

  6. If all index errors are resolved, delete the old indexes directory.

 

If clearing the index cache does not help and the same error message still persists when performing the re-index, then the corruption might be related to the data itself. Observing the error message again:

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Cannot specify both grouplevel and rolelevel comment visibility

We can see that the error is related to having specified both group and project-role visibility restrictions to a comment, which is illegal in JIRA. (Probably caused by a third party plugin?) You can only specify either one, but not both. In order to check this in the database, we can run the following query:

select * from jiraaction where actionlevel is not null and rolelevel is not null;

Basically there should  not  be a value for both the actionlevel column and the rolelevel column. If both columns contain a value, then that's the problem we need to fix. To fix it, simply set either the actionlevel column or rolelevel column value to null.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.