Reindex fails with Unknown format version Error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

When attempting to reindex within JIRA, it will fail.

The following appears with atlassian-jira.log:

2012-08-11 11:58:12,521 main ERROR      [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
com.atlassian.jira.util.RuntimeIOException: org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
	at com.atlassian.jira.index.DefaultIndexEngine.clean(DefaultIndexEngine.java:143)
	at com.atlassian.jira.index.DefaultManager.deleteIndexDirectory(DefaultManager.java:43)
	at com.atlassian.jira.issue.index.DefaultIssueIndexer.deleteIndexes(DefaultIssueIndexer.java:176)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:236)
	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:81)
	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
	at $Proxy113.reIndexAll(Unknown Source)
	at com.atlassian.jira.upgrade.tasks.AbstractReindexUpgradeTask.doUpgrade(AbstractReindexUpgradeTask.java:43)
	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSuccess(UpgradeManagerImpl.java:609)
	at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:496)
	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:426)
	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:370)
	at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:309)
	at com.atlassian.jira.upgrade.UpgradeLauncher.checkIfUpgradeNeeded(UpgradeLauncher.java:100)
	at com.atlassian.jira.upgrade.UpgradeLauncher.start(UpgradeLauncher.java:49)
	at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:103)
	at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:250)
	at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:149)
	...
Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
	at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:247)
	at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:178)
	at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1628)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1090)
	at com.atlassian.jira.index.DefaultIndexEngine.clean(DefaultIndexEngine.java:139)
	... 51 more

Cause

The error indicates that the Lucene index is for a version that is not compatible with the current version of JIRA. This can happen during an upgrade or downgrade as the index files within $JIRA_HOME/caches/indexes/ are for a different version.

Resolution

Here are the following steps on how to fix this problem:

  1. Stop JIRA.
  2. Remove all the contents from under the JIRA index directory, which is typically $JIRA_HOME/caches/indexes/.
  3. Restart JIRA.
  4. Perform a full re-index via Administration >> System >> Indexing.

(info) The indexing process will require downtime, so it is advisable to run this after operation/office hours or during the weekends.





Last modified on Jan 14, 2025

Was this helpful?

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