Queues missing in all Jira Service Management projects after restart of Jira Data Center / Server
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
After restart of the Jira instance, you are presented with the following issues:
- No queues visible for any of the Jira Service Management projects
Project Settings pages related to JSM showed a blank page and error 403 as follows
403 ErrorForbidden (403) Encountered a "403 - Forbidden" error while loading this page. JIRA Service Desk is not licensed
Environment
Jira Service Management 5.x , 10.x
Diagnosis
When checking the atlassian-jira.log
file the following sequence of errors can be found during startup:
2024-10-02 04:41:13,393+0000 main INFO [atlassian.servicedesk.lifecycle] Startup has failed with an unexpected problem. It is unsafe to proceed.
2024-10-02 04:41:13,393+0000 main ERROR [c.a.s.b.lifecycle.server.ServerPluginLifeCycle] Cannot invoke "com.atlassian.jira.issue.fields.CustomField.getCustomFieldType()" because "customField" is null
java.lang.NullPointerException: Cannot invoke "com.atlassian.jira.issue.fields.CustomField.getCustomFieldType()" because "customField" is null
at com.atlassian.servicedesk.internal.sla.customfield.SLAFieldManagerImpl.getOptionalFieldValue(SLAFieldManagerImpl.java:189)
at com.atlassian.servicedesk.internal.sla.customfield.SLAFieldManagerImpl.getFieldValue(SLAFieldManagerImpl.java:181)
...
2024-10-02 04:41:13,406+0000 main INFO [atlassian.servicedesk.lifecycle] We are now in an indeterminable state.
The following database query will show several rows:
select concat(pr.pkey,'-',ji.issuenum) from jiraissue ji
join project pr on pr.id = ji.project
join "AO_F1B27B_KEY_COMPONENT" kc on CAST(kc."VALUE" as INTEGER) = ji.id and kc."KEY" = 'issue.id'
join "AO_F1B27B_PROMISE" p on p."ID" = kc."TIMED_PROMISE_ID"
where p."STATUS" = 'WAITING_ON_TASK';
NOTE: the above query has been created and tested for PostgreSQL, depending on your database the syntax may need to be adjusted.
Cause
The cause for this issue is similar to JSDSERVER-11964 - Getting issue details... STATUS .
- During start up, JSM initialises the "Timed Promise" system so that SLA can be calculated as per normal functionality.
- As part of this check, the AO_F1B27B_PROMISE database table is looked up and any SLA entries that have the STATUS of WAITING_ON_TASKS are processed
- This promise is associated to a fixed set of issues. These can be found in the DB by matching the row in the "AO_F1B27B_PROMISE" table's ID column to the "AO_F1B27B_KEY_COMPONENT" table's "TIMED_PROMISE_ID" column. The issue key will be listed with KEY='issue.id' and VALUE to be the id of the issue within the jiraissue table
- If an issue in that table has a SLA that is to be calculated, AND there is a CustomField, that cannot be interpreted correctly the SLA calculation will fail and prevents start up
Solution
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.
To correct the situation the following workaround can be used:
- Shut down Jira (on all nodes)
- Use the query from the diagnosis step to collect a list of the affected Jira issues
Run the following query, so that these issues gets ignored for the "Timed Promise" system during startup
UPDATE "AO_F1B27B_PROMISE" SET "STATUS" = 'SCHEDULED' WHERE "STATUS" = 'WAITING_ON_TASK';
- Start Jira (on all nodes)
- Force the recalculation of the SLA for the issues returned by the query in step 2 as outlined in Missing or corrupted SLA data in Jira Service Management
If you encounter any issues during the above or if you have any questions, please contact Atlassian Support.
Still having problems?
Contact Atlassian Support. We'll be happy to advise you. Please include as much detail as possible, where applicable:
- Logs from the affected application (if applicable)
- Screenshots of the error message (if they're not covered in logs)
- Information about the steps you've taken previously