'Jira Software is currently unavailable' error after upgrading to Jira 7 or newer
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Jira Software throws 'Jira Software is currently unavailable' after the upgrade.
Environment
Jira upgraded to version 7 or above.
Diagnosis
Symptom 1
After performing an upgrade to Jira 7.0, the error message "Jira Software is currently unavailable" is seen. This might be because an upgrade task has failed to run or has not yet completed" is displayed on the top of the page despite upgrading Jira Software to the latest version.
The following appears in the atlassian-jira.log:
2015-12-22 11:17:23,423 localhost-startStop-1 ERROR [c.a.s.core.upgrade.PluginUpgrader] Upgrade failed: com.pyxis.greenhopper.jira.fields.NotSupported cannot be cast to com.pyxis.greenhopper.jira.fields.CustomIssueField
java.lang.ClassCastException: com.pyxis.greenhopper.jira.fields.NotSupported cannot be cast to com.pyxis.greenhopper.jira.fields.CustomIssueField
at com.pyxis.greenhopper.jira.configurations.ScrumDefaultConfiguration.getFlagField(ScrumDefaultConfiguration.java:261)
at com.pyxis.greenhopper.jira.configurations.ScrumDefaultConfiguration.init(ScrumDefaultConfiguration.java:99)
at com.atlassian.greenhopper.upgrade.GhUpgradeTask002.initScrumConfiguration(GhUpgradeTask002.java:105)
at com.atlassian.greenhopper.upgrade.GhUpgradeTask002.doUpgrade(GhUpgradeTask002.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Cause
Jira is unable to find certain system fields that come with the bundled plugins. Without these fields, the Jira Software plugin will be unable to upgrade reliably.
For fix, go to Resolution 1.
Symptom 2
If Jira Software was mistakenly upgraded to a later version and reverting back shows the error "Jira Software is currently unavailable" but nothing is shown in the logs.
Restarting Jira does not resolve this issue, and the only evidence that Jira Software (Agile) was upgraded during start-up logs as below (pay attention to task numbers 41 and 42 in the example) -
The following JIRA Agile upgrade tasks have been run on this system
..
..
JAG UpgradeTask 41 started at 07 Mar 2017 12:14 within JAG v7.0.11 (63b8de25536543e7)
JAG UpgradeTask 41 ended at 07 Mar 2017 12:14 within JAG v7.0.11 (63b8de25536543e7) and took 0 ms
JAG UpgradeTask 42 started at 10 Oct 2018 03:31 within JAG v7.12.0-DAILY20180906101548 (41d291e8587c10b9)
JAG UpgradeTask 42 ended at 10 Oct 2018 03:31 within JAG v7.12.0-DAILY20180906101548 (41d291e8587c10b9) and took 2091 ms
But a mismatch is shown during Agile start-up -
*********************************************************************************
Atlassian GreenHopper v7.0.11 #63b8de25536543e7 built 2016-01-19T18:17:24.285-05:00 - plugin started. Get Agile!
*********************************************************************************
Jira should only be on version 7.0.11 but the above logging shows the upgrade task for 7.12.0 has been run then Jira will run into problems such as Boards not showing up.
Cause
Jira Software is using the later build done by the upgrade task even though it started with the correct version.
You can see that it is using the later build by searching for the following line in the Jira start-up logs -
com.pyxis.greenhopper.jira:build
If the build shows it is using 42 rather than 41 it means Jira despite showing it started the correct version is using the wrong package.
For fix, go to Resolution 2.
Symptom 3
The error message "Jira Software is currently unavailable" can also be observed when Atlassian GreenHopper is running on version higher than that of JIRA Agile last UpgradeTask. The error is more prevalent when Jira has been downgraded to a lower version by adding the parameter - JVM_SUPPORT_RECOMMENDED_ARGS="-Djira.downgrade.allowed=true” in setenv.sh file
The following appears in the atlassian-greenhopper.log file:
The following JIRA Agile upgrade tasks have been run on this system
..
.. JAG UpgradeTask 50 started at 11 Jul 2017 10:11 within JAG v7.0.11 (63b8de25536543e7)
JAG UpgradeTask 50 ended at 11 Jul 2017 10:11 within JAG v7.0.11 (63b8de25536543e7) and took 0 ms
JAG UpgradeTask 51 started at 10 Dec 2018 01:00 within JAG v7.6.0-DAILY20171103151351 (bf7f6e5bc512cc51)
JAG UpgradeTask 51 ended at 10 Dec 2018 01:00 within JAG v7.6.0-DAILY20171103151351 (bf7f6e5bc512cc51) and took 312 ms
JAG UpgradeTask 52 started at 21 Apr 2023 04:13 within JAG v9.4.0 (7843a91ab32d8e90)
JAG UpgradeTask 52 ended at 21 Apr 2023 04:13 within JAG v9.4.0 (7843a91ab32d8e90) and took 1 ms
But a mismatch is shown during Agile start-up -
*********************************************************************************
Atlassian GreenHopper v9.4.9 #eda76e47b154b2eb built 2023-08-01T15:39:28.832+01:00 - plugin started. Get Agile! *********************************************************************************
Cause
Jira software reports to be running on version 9.4.9 . However, the JIRA Agile upgrade tasks are not recorded correctly in the database.
For fix, go to Resolution 3.
Symptom 4
Plenty of modules are missing in Jira Agile(Under Manage apps → Application Components → Jira Agile). For example on Jira 9.12 you should see 587 modules within the Agile app, while there are only 230 modules.
Cause
Jira Agile is not loaded properly after the upgrade.
Solution
For symptom 1
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
Execute the SQL below to check for any disabled plugin(s):
SELECT * FROM pluginstate where pluginenabled = 'false';
If this query does not return any rows, then the resolution outlined in this document is not applicable to your Jira application instance. If there are valid rows returned, then please proceed to step number 2.
Enable any plugin(s) that is disabled using the SQL query below:
delete from pluginstate WHERE pluginkey='<pluginkey from query above>';
- Restart the Jira application.
For symptom 2
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
Take the above ID (not entity_id) and run the following query to check the value that would need to be changed
select pe.id, pe.entity_name, pe.property_key, n.propertyvalue from propertyentry pe join propertynumber n on pe.id = n.id where pe.property_key = 'GreenHopper.Upgrade.Latest.Upgraded.Version';
If propertyvalue shows the exact same as the latest upgradeTask that is not for the Jira version that should be running then it will need to be updated.
For Oracle database, it is required to run the Commit after the update.
Run the following update query to update the value
update propertynumber set propertyvalue = '<value of previous upgradeTask for this example it's 41>' where id = '<id from first query>';
Restart the Jira application.
For symptom 3
Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.
Execute the below query to retrieve the ID that will need to be updated
select * from propertystring s, propertyentry e where e.entity_id = s.id and e.property_key = 'GreenHopper.Upgrade.Latest.Upgraded.Version';
Execute the below query to identify if the propertyvalue is less than the last JAG UpgradeTask. Here, less than 52
select pe.id, pe.entity_name, pe.property_key, n.id, n.propertyvalue from propertyentry pe, propertynumber n where pe.id = '<value of id from query 1, for this example it is 10834>' and pe.id = n.id;
Update a new property value w.r.t to the id for newer version. Here, 9.4.9 and taking the value as a new number '53' assuming the value of above query is less than 52.
update propertynumber set propertyvalue = '53' where id = '10834';
For Oracle database, it is required to run the Commit after the update.
- Restart the Jira application.
For symptom 4
Clear out Jira's plugin cache as described in How to clear Jira Data Center / Server plugin cache