JIRA doesn't start, with errors around initslowstuff and Error starting components
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
Summary
After restoring a database backup from production to a new instance, Jira does not start and fails with various errors some of which are listed below
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2022-12-01 10:15:49,550-0500 JIRA-Bootstrap ERROR [c.a.upgrade.core.DefaultUpgradeTaskFactoryProcessor] Failed to run performUpgradesUnsafe tasks from factory com.atlassian.audit.atlassian-audit-plugin
java.lang.NullPointerException: id
at java.util.Objects.requireNonNull(Objects.java:228)
at com.atlassian.jira.database.IdGeneratingSQLInsertClause.executeWithId(IdGeneratingSQLInsertClause.java:69)
at com.atlassian.jira.upgrade.UpgradeTaskHistoryDaoImpl.lambda$createUpgradeTaskHistory$0(UpgradeTaskHistoryDaoImpl.java:45)
........
2022-12-01 10:15:53,827-0500 JIRA-Bootstrap ERROR [c.a.upgrade.core.DefaultUpgradeTaskFactoryProcessor] Failed to run performUpgradesUnsafe tasks from factory com.atlassian.jira.plugins.inform.batching-plugin
java.lang.NullPointerException: id
at java.util.Objects.requireNonNull(Objects.java:228)
at com.atlassian.jira.database.IdGeneratingSQLInsertClause.executeWithId(IdGeneratingSQLInsertClause.java:69)
at com.atlassian.jira.upgrade.UpgradeTaskHistoryDaoImpl.lambda$createUpgradeTaskHistory$0(UpgradeTaskHistoryDaoImpl.java:45)
........
2022-12-01 10:15:59,409-0500 JIRA-Bootstrap ERROR [c.a.r.d.internal.dao.QDSLSystemRateLimitingSettingsDao] Caught error inserting system rate limiting settings: [SystemRateLimitingSettings(mode=OFF, bucketSettings=TokenBucketSettings(capacity=50, fillRate=10, intervalFrequency=1, intervalTimeUnit=Seconds), jobControlSettings=SystemJobControlSettings(reportingDbArchivingJobFrequencyDuration=PT1M10S, reportingDbRetentionPeriodDuration=PT24H, bucketCollectionJobFrequencyDuration=PT5M, bucketCleanupJobFrequencyDuration=PT15M, settingsReloadJobFrequencyDuration=PT1M))] into DB - rolling back transaction
...........
2022-12-01 10:16:00,950-0500 JIRA-Bootstrap ERROR [c.a.jira.upgrade.PluginSystemLauncher] A fatal error occured during initialisation. JIRA has been locked.
com.atlassian.jira.InfrastructureException: Error occurred while starting component 'com.atlassian.jira.web.action.issue.DefaultTemporaryWebAttachmentsMonitor'.
at com.atlassian.jira.component.pico.ComponentManager.startStartableComponents(ComponentManager.java:338)
at com.atlassian.jira.component.pico.ComponentManager.earlyStartPluginSystem(ComponentManager.java:251)
..........
Caused by: java.lang.RuntimeException: com.atlassian.scheduler.SchedulerServiceException: Unable to either create or replace clustered job: ImmutableClusteredJob[jobId=com.atlassian.jira.web.action.issue.DefaultTemporaryWebAttachmentsMonitor,jobRunnerKey=com.atlassian.jira.web.action.issue.DefaultTemporaryWebAttachmentsMonitor,schedule=Schedule[type=INTERVAL,intervalScheduleInfo=IntervalScheduleInfo[firstRunTime=Thu Dec 01 11:16:00 EST 2022,intervalInMillis=3600000]],nextRunTime=Thu Dec 01 11:16:00 EST 2022,version=1,rawParameters=(null)]
at com.atlassian.jira.web.action.issue.DefaultTemporaryWebAttachmentsMonitor.scheduleCleanup(DefaultTemporaryWebAttachmentsMonitor.java:75)
at com.atlassian.jira.web.action.issue.DefaultTemporaryWebAttachmentsMonitor.start(DefaultTemporaryWebAttachmentsMonitor.java:61)
Environment
8.20.13
Diagnosis
Even though the recent most error might point to the clusteredjob table as a suspect, it is important to identify any preceding errors, while Jira performs certain checks as part of upgrade tasks and initialization during the startup. As seen from the above snippet a number of components that are affected are related to AO tables. Some related AO tables for each of the above errors are listed below.
QDSLSystemRateLimitingSettingsDao - AO_AC3877_SYSTEM_RL_SETTINGS
com.atlassian.jira.plugins.inform.batching-plugin - AO_733371_EVENT
com.atlassian.audit.atlassian-audit-plugin - AO_C77861_AUDIT_ENTITY
Cause
The problem usually occurs when there were some metadata mismatch and configuration issues during the database restore. This would not manifest in the logs clearly during a Jira startup later. Identify any errors printed o.o.c.entity.jdbc.DatabaseUtil during the Jira start up if any such as below
1
2
3
JIRA-Bootstrap ERROR [o.o.c.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
ALTER TABLE OS_CURRENTSTEP MODIFY OWNER VARCHAR(255)
Error was: java.sql.SQLSyntaxErrorException: Table 'jira_dev_db.OS_CURRENTSTEP' doesn't exist
Otherwise try looking up the errors in the run up to the startup and establish a pattern of database related issues during initialization like above
Solution
Check on the pre-requisite of the database and drivers for the specific Jira version from Supported Platforms and verify if the dbconfig.xml is configured correctly.
Look for a pattern of failures such as above which point to case sensitive tables like AO tables not being accessible or update/insert on those tables erroring out.
Suggest to restore the backup of the database again to a newer DB schema and ensure that there were no errors during the restore process. Check for any errors logged by o.o.c.entity.jdbc.DatabaseUtil during the startup
Was this helpful?