Attempting a Re-Index Fails with an Error Stating 'Cannot specify both grouplevel and rolelevel comment visibility'
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Attempting a re-index fails with the following errors:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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:
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
.Shutdown JIRA.
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
).Start JIRA.
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!
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:
1
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:
1
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.
Was this helpful?