'Disabling Indexing' or 'Cannot Create Directory' Errors Appear When Upgrading JIRA

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

Symptoms

When upgrading JIRA directly using the Alternative method of upgrading JIRA, the upgrade either fails outright or the dashboard reports indexing errors after the upgrade.

Symptom 1: Upgrade Fails Outright

If the upgrade fails outright, the logs include error messages like one of the following:

1 2 2010-07-13 17:06:54,389 http-8567-3 ERROR anonymous 1026x27x1 1rhsdt7 127.0.0.1 /secure/ConfirmInstallationWithLicense.jspa [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: java.io.IOException: Cannot create directory: /FOOBAR/comments com.atlassian.jira.util.RuntimeIOException: java.io.IOException: Cannot create directory: /FOOBAR/comments

Symptom 2: Upgrade Succeeds, but Dashboards Are Broken

The upgrade may succeed, but dashboards may contain gadgets that look like the following:

(Auto-migrated image: description temporarily unavailable)

In addition, the logs contain error messages like:

1 2010-07-13 17:14:40,644 main ERROR [atlassian.jira.upgrade.ConsistencyCheckImpl] Indexing is turned on, but index path /tmp/really/deep/set/of/subdirs invalid - disabling indexing

Cause

The JIRA database contains an index path that points to a directory that's either unwritable, or which does not currently exist. If the directory isn't writable, the first error appears. If the directory doesn't exist, the second error appears.

This problem can often happen when creating a test instance from an SQL dump or migrating JIRA to a new server with a different directory structure.

Resolution

This problem can be resolved a few different ways:

  1. Make sure the directory locations for indexes and attachments exist and are writable. If working with a database dump, is is possible to find the locations using a database query like:

    1 select pe.property_key, pe.id, ps.propertyvalue from propertyentry pe join propertystring ps on (ps.id=pe.id) where pe.property_key like 'jira.path%';
  2. Update the paths in the database prior to starting JIRA using commands like the following:

    1 2 update propertystring set propertyvalue = '/new/directory/indexes' where id in (select id from propertyentry where property_key='jira.path.index'); update propertystring set propertyvalue = '/new/directory/attachments' where id in (select id from propertyentry where property_key='jira.path.attachments');

    Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  3. Upgrade using an XML backup (not recommended for large instances)

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.