Troubleshoot search index consistency checks
You should also see this message in the logs:
WARN [c.a.j.issue.index.IndexConsistencyUtils] Index consistency check failed for index 'Issue': expectedCount=20; actualCount=5; tolerancePercentage=10, tolerance=10
INFO [c.a.j.search.lucene.LuceneConsistencyChecker] Index consistency check finished. indexConsistent: false; timeToCheckIndexConsistency: 76 ms
WARN [c.a.jira.servlet.ApplicationStateResolverImpl] The search index is inconsistent. This node will report its status as ERROR.
What is search index consistency?
Jira performs consistency checks to make sure the search index matches the current state of issues in the database. If Jira finds any inconsistencies, it reports an ERROR status to prevent serving incorrect search results.
The consistency check compares:
The number of issues in the database
The number of documents in the search index
The state of the index relative to recent changes
Resolve status health check returning 500 with error state
Below you’ll find guidance on how to solve this issue for both Lucene and OpenSearch search platforms.
Resolving error state for Lucene search platform
If your Jira instance is using Lucene as the search platform and the status health check returns a 500 with an ERROR state, start by waiting. This is often a temporary state. Jira will attempt to recover the index from a snapshot. If recovery is successful, the health check will return 200.
If the status does not change after a significant period (the duration depends on your instance size and configuration), review how the index is distributed between Jira nodes in the Jira Data Center search indexing documentation.
To resolve the issue:
Follow the steps in the Index Replication Jira Data Center troubleshooting guide.
If the problem persists, you can temporarily disable index consistency checking while you address the underlying issue.
Resolving error state for OpenSearch search platform
If your Jira instance is using OpenSearch as the search platform:
- Check network connectivity:
Make sure the network connection between Jira and the OpenSearch cluster is stable.
Check firewall rules and monitor network latency.
- Check OpenSearch cluster health:
Go to System, then Troubleshooting and support tools and verify that your OpenSearch cluster is healthy.
Make sure all nodes are accessible and working as expected.
Check OpenSearch logs for any errors or warnings
- Verify index replay service:
Check if OpenSearch uses the index replay service to maintain consistency.
Go to System, then Scheduler administration to make sure the service is running as expected.
Review logs for any replay job failures.
Gather information about the index summary or, alternatively, use the script below instead of
index_os.sh.
- Perform a full reindex: go to Administration, then System, then Indexing, and then select Full re-index to rebuild the entire search index.
Workarounds
Disabling index consistency checking
Only use this workaround as a temporary solution. Disabling consistency checks can hide actual index issues.
You can temporarily turn off index consistency checks in Jira:
Set the system property:
-Dcom.atlassian.jira.status.index.check=false.Follow the steps in the Setting properties and options on startup documentation.
Restart Jira.
After the restart, Jira won’t show the indexing status in the health check.