Details
-
Bug
-
Resolution: Fixed
-
Medium
-
6.4, 6.4.1
-
None
-
6.04
-
Description
Background:
On JIRA start, the IndexRecoveryLauncher checks that the index is up to date with the database and attempts to catch it up if it detects that it has fallen behind. If the index is in a corrupt state however this leaves JIRA locked.
Expected behaviour:
The expected behavior is that JIRA is allowed to start to give an admin an opportunity of recovering the index from a known good snapshot. Search related functionality will not be usable until the corruption issue is fixed.
Workaround:
The workaround is to move the corrupt index directory out of the way before starting JIRA. Once JIRA has started the index can be restored from a backup or the index can be rebuilt with a reindex operation. The corrupt files can then be removed.
Diagnosis:
Instances affected by this issue will be inaccessible and a stacktrace similar to the following will be logged:
2015-04-12 19:21:06,249 localhost-startStop-1 ERROR [atlassian.jira.startup.LauncherContextListener] Unable to start JIRA. com.atlassian.jira.issue.index.SearchUnavailableException: com.atlassian.jira.util.RuntimeIOException: java.io.FileNotFoundException: /opt/j2ee/domains/atlassian.com/extranet-jira/jira-home/caches/indexes/issues/_3yfh2_4.de l (No such file or directory) at com.atlassian.jira.issue.index.SearcherCache.retrieveEntitySearcher(SearcherCache.java:49) at com.atlassian.jira.issue.index.DefaultIssueSearcherFactory.getEntitySearcher(DefaultIssueSearcherFactory.java:29) at com.atlassian.jira.issue.search.SearchProviderFactoryImpl.getSearcher(SearchProviderFactoryImpl.java:29) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:419) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.search(LuceneSearchProvider.java:413) at com.atlassian.jira.issue.search.providers.LuceneSearchProvider.searchOverrideSecurity(LuceneSearchProvider.java:117) at com.atlassian.jira.index.ha.DefaultIndexRecoveryManager.getLatestIndexDate(DefaultIndexRecoveryManager.java:302) at com.atlassian.jira.index.ha.DefaultIndexRecoveryManager.getDurationToRecover(DefaultIndexRecoveryManager.java:282) at com.atlassian.jira.startup.IndexRecoveryLauncher.start(IndexRecoveryLauncher.java:49) at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:143) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:345) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:215) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:124) at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:33) at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:86) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:34) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:81) at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:72) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:663) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1642) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)