Reindex fails with Unknown format version Error
症状
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
原因
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.
ソリューション
Here are the following steps on how to fix this problem:
- Jira を停止します。
- Remove all the contents from under the JIRA index directory, which is typically
$JIRA_HOME/caches/indexes/
. - Jira を再起動します。
- Perform a full re-index via
Administration >> System >> Indexing
.
The indexing process will require downtime, so it is advisable to run this after operation/office hours or during the weekends.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.