Lucene Search Indexes health check fails in Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Purpose

JIRA uses indexes to provide quick results to search queries that are made by users and internal functions of JIRA, as described in our Search Indexing documentation. A third-party library called Lucene provides these indexes. This health check inspects the state of the search index and confirms that it is consistent with the database. The Health Check is provided by the JIRA Instance Health Add-on.


Solution

Understanding the Results

IconResultWhat this means
The check of the database and the index is ok. The database had <issue-count> issues with the most recent update at <date> and the index had <issue-count> issues with the most recent update at <date>.The health check did not discover any problems with your Lucene Index.
The issue index is inconsistent with the database state (see below).This result indicates a problem with the reliability of your JIRA Indexes when the node is in a Disaster Recovery mode. During this mode, the health-check will allow a 30 second discrepancy between the indexes and the database.
The issue index is inconsistent with the database state. Database has (<issue-count-1>) issues but the index has (<issue-count-2>) issues.This result indicates a problem with the reliability of your JIRA Indexes. In case of JIRA DataCenter this is expected that index at one of the nodes will be slightly behind another node during active operations (see below).
The issue index is inconsistent with the database state. The last issue update recorded in the database was at (<date-1>) but the last issue update recorded in the index was at (<date-2>).This result indicates a problem with the reliability of your JIRA Indexes. In case of JIRA DataCenter this is expected that index at one of the nodes will be slightly behind another node during active operations (see below).
Lucene search is not available. <error-message>

There was a problem testing the Lucene index.

Lucene search terminated abnormally: <error-message>There was a problem running the search. This could mean the index was unavailable, or a more serious problem occurred. If you experience this issue frequently, please check the logs for errors

Troubleshooting

For general JIRA Lucene Indexing related issues, please review the Troubleshoot index problems in Jira server article.

ProblemSuggestion
  • Index is inconsistent with database, a higher number of issues in database, compared to index.
  • Index is inconsistent with database, a higher number of issues within index, compared to database.

Attempt to reindex the node as per Search Indexing and monitor the logs for any errors.

  • A slow disk speed can contribute to indexing problems and can be tested as per our Testing Disk Access Speed KB.
  • There may be other services updating the JIRA Database, or issue without re-indexing. Run the following SQL to locate the last updated issue, and review the update history to narrow down the problem. The sample SQL below should work for Postgres:

    SELECT p.pkey 
               ||'-' 
               ||j.issuenum AS jiraissue, 
           j.updated 
    FROM   project p, 
           jiraissue j 
    WHERE  p.id=j.project 
    AND    j.updated = 
           ( 
                  SELECT Max(updated) 
                  FROM   jiraissue);


The issue index is inconsistent with the database state for JIRA DataCenter:

  • The issue index is inconsistent with the database state. The last issue update recorded in the database was at (Date) but the last issue update recorded in the index was at (Same Date)
  • The issue index is inconsistent with the database state. Database has (N) issues but the index has (N+1) issues

Check status at each node to see if there is an actual problem. Monitor instance status over period of time to see if difference will grow. Attempt to copy index from healthy node if required.

Improvement ticket:

JRA-61501 - Getting issue details... STATUS

Lucene Search is not available.Contact Atlassian Support with the collected information below and the reported error message seen.
Lucene search terminated abnormallyPlease have this issue assessed by Atlassian. Heavy load in the JIRA instance may instigate this problem Contact Atlassian Support with the collected information below and the reported error message seen.
Lucene Health Check failure notification is displayed in JIRA Data Center as a false positive (it fails in the notification, on the instance health screen it passes)Update to the latest version of the JIRA Instance Health Add-on, as it was disabled for JIRA Data Center in version 2.1.21 as it was generating false positives.

Providing Information to Support

In case you are unable to troubleshoot and fix the problem by yourself, please create a support ticket at support.atlassian.com and attach the following information to the ticket:

  • Take a Screenshot of the Health Check results.
  • Collect a Support ZIP from each of the Data Centre nodes.
  • Any collected information from the suggestions in this document.


DescriptionJIRA uses indexes to provide quick results to search queries that are made by users and internal functions of JIRA, as described in our Search Indexing documentation. A third-party library called Lucene provides these indexes. This health check inspects the state of the search index and confirms that it is consistent with the database. The Health Check is provided by the JIRA Instance Health Add-on.
ProductJira


Last modified on Sep 25, 2019

Was this helpful?

Yes
No
Provide feedback about this article

In this section

Powered by Confluence and Scroll Viewport.