Unable to Rebuild JIRA Index

系统 1948 0

Symptoms

Accessing certain JIRA pages result in:

SEVERE: Internal server error
com.atlassian.jira.issue.index.SearchUnavailableException: com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.jira.util.RuntimeIOException: org.apache.lucene.index.CorruptIndexException: doc counts differ for segment _ow2: fieldsReader shows 1 but segmentInfo shows 50
at com.atlassian.jira.issue.index.DefaultIndexManager$1.get(DefaultIndexManager.java:85)
at com.atlassian.jira.issue.index.DefaultIndexManager$1.get(DefaultIndexManager.java:76)
at com.atlassian.jira.issue.index.SearcherCache.retrieveIssueSearcher(SearcherCache.java:38)

Filters are resulting in:

Caused by: java.io.FileNotFoundException: /local/jira/jira444/home/caches/indexes/entities/searchrequest/_o5.fnm (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java: 212 )
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.<init>(SimpleFSDirectory.java: 78 )
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFSDirectory.java: 108 )

When trying to re-index JIRA, the following error will be thrown:

java.io.IOException: read past EOF
Task completed in 2 seconds with unexpected error.
Started Today 8:29 PM.
Finished Today 8:29 PM.
com.atlassian.jira.util.RuntimeIOException: java.io.IOException: read past EOF at com.atlassian.jira.index.DefaultIndexEngine.clean(DefaultIndexEngine.java:145) at com.atlassian.jira.index.DefaultManager.deleteIndexDirectory(DefaultManager.java:44) at com.atlassian.jira.issue.index.DefaultIssueIndexer.deleteIndexes(DefaultIssueIndexer.java:170) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:219) ... at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249) at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: read past EOF

This error can also be thrown during a re-index:

        2012-11-25 16:21:36,897 JiraTaskExectionThread-1 ERROR admin 981x203x1 6slf04 10.1.250.116 /secure/admin/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All FAILED.  Indexer: DefaultIndexManager: paths: [/var/atlassian/application-data/jira/caches/indexes/comments, /var/atlassian/application-data/jira/caches/indexes/issues, /var/atlassian/application-data/jira/caches/indexes/changes]

com.atlassian.jira.util.RuntimeIOException: java.io.IOException: directory '/var/atlassian/application-data/jira/caches/indexes/comments' exists and is a directory, but cannot be listed: list() returned null

	at com.atlassian.jira.index.DefaultIndexEngine.clean(DefaultIndexEngine.java:146)

	at com.atlassian.jira.index.DefaultManager.deleteIndexDirectory(DefaultManager.java:43)

	at com.atlassian.jira.issue.index.DefaultIssueIndexer.deleteIndexes(DefaultIssueIndexer.java:205)

	at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:824)

	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:335)

	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:301)

Caused by: java.io.IOException: directory '/var/atlassian/application-data/jira/caches/indexes/comments' exists and is a directory, but cannot be listed: list() returned null
      

 

Cause

The re-indexing process fails when JIRA index file(s) is/are corrupted for any reason, for example the JIRA service may be terminated unexpectedly because of an power outage.

Resolution

Icon
A re-index will lock down the JIRA and prevent users from using JIRA. Please keep this in mind when following these steps to resolve this issue - depending on the size of the instance a downtime window may require scheduling. With the release of JIRA 5.2, an option to perform a background re-index was implemented, but it is advised you use the Lock JIRA and perform a re-index in this scenario. See this page for more details:   Search Indexing
  1. Stop JIRA.
  2. Make a backup of the following directory and all its subdirectories:

                    $JIRA_HOME/caches/indexes
                  
  3. Remove the following directory and all its subdirectories:

                    $JIRA_HOME/caches/indexes
                  

      This will be rebuilt when JIRA is next reindexed.

  4. Start JIRA.
  5. Perform a re-index of JIRA through the Administration section.

Unable to Rebuild JIRA Index


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论