After upgrading JIRA indexing is disabled

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

After upgrading JIRA indexing is disabled, the following error appears in the screen:

The following appears in the atlassian-jira.log:

2013-03-05 16:10:34,616 http-bio-8090-exec-13 WARN admin 970x217x1 1nazqu3 127.0.0.1 /secure/admin/IndexAdmin.jspa [jira.issue.index.IndexConsistencyUtils] Index consistency check failed for index 'Issue': com.atlassian.jira.issue.index.SearchUnavailableException: java.lang.IllegalStateException: Indexing is disabled.

OR


2014-06-20 10:39:23,781 localhost-startStop-1 ERROR      [atlassian.jira.upgrade.ConsistencyCheckImpl] Indexing is turned on, but index path [/localdisk/var/jira/jira-index] invalid - disabling indexing

Diagnosis

Execute the query below and check the propertyvalue column.  Values 0 means disabled and 1 means enabled:

select * from propertynumber where id in (select id from propertyentry where property_key = 'jira.path.index.use.default.directory' or property_key = 'jira.option.indexing');

Cause

Prior to JIRA 4.2 it was possible to customize the index path. Due to security improvements, this is no longer possible. This issue occurs when the new version of JIRA can not reach the customized index path. This error is similar to the one as described in How to fix a JIRA application that is unable to perform a background re-index "at this time error". There is a bug raised for this under  JRA-38845 - Getting issue details... STATUS .

Resolution

(warning)  For JIRA 8.x and later 7.x versions, this property is no longer stored in the propertystring table and this modification will not work. 

(warning)  This value is also not stored in the jpm.xml file, and later versions of JIRA do not have a jira-config.properties file by default. 

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

  1. Shutdown JIRA.
  2. Execute the update statement bellow:

    update propertynumber set propertyvalue = 1 where id in (select id from propertyentry where property_key = 'jira.path.index.use.default.directory' or property_key = 'jira.option.indexing');
  3. Restart JIRA.

If the index path is invalid:

  1. Stop JIRA.

  2. Execute the following to identify the index path:

    select * from propertystring ps join propertyentry pe on ps.id = pe.id where property_key = 'jira.path.index';

    This will output something like the following:

      id   |                       propertyvalue                          |  id   |   entity_name   | entity_id |  property_key   | propertytype
    -------+--------------------------------------------------------------+-------+-----------------+-----------+-----------------+--------------
     10007 | /Users/aquaman/deployments/avengers/jira-home/caches/indexes | 10007 | jira.properties |         1 | jira.path.index |            5
  3. Update the database to the new directory is:

    update propertystring set propertyvalue = '<index path>' where id = '<id from step 2>';
  4. Start JIRA.


Last modified on May 7, 2019

Was this helpful?

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