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

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

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:

In addition, the logs contain error messages like:

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:

    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:

    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 performing any modifications to the database. 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)

 

Last modified on Jun 7, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.