Operations fail in Jira with error: cannot initialize IndexWriter
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Several operations in Jira may fail with the message "cannot initialize IndexWriter" in atlassian-jira.log. The message may reach the user in some cases, too.
Below's an example of the message in a Project Automation context (from Jira Service Management):
Unexpected error executing rule: java.lang.IllegalArgumentException: Directory MMapDirectory@/var/atlassian/application-data/jira/caches/indexesV1/issues lockFactory=org.apache.lucene.store.NativeFSLockFactory@48d350c9 still has pending deleted files; cannot initialize IndexWriter |
Environment
All versions of Jira Core 8.x.
Diagnosis
To diagnose this, simply search for the "cannot initialize IndexWriter" in the logs. If it's present, this KB article's fit for your case.
1
grep "cannot initialize IndexWriter" $JIRA_HOME/log/atlassian-jira.log -c
Cause
Jira cannot operate on it's Index properly. The root causes are still unknown, but we suspect external factor might be in play like antivirus software, backup jobs or other filesystem process that locks or changes the Jira index files or folder.
Solution
Simply restart Jira or the DC node printing these messages in the log. The restart shall restore Jira's sync to its Index and Jira shall operate as expected thereafter.
Was this helpful?