JIRA fails to start on system restart - Windows

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

Symptoms

  1. When Windows or Windows Server machine restarts, the JIRA service fails to start.

  2. The database engine for JIRA is running on the same machine as JIRA.

The following appears in the atlassian-jira.log:

1 2 2012-04-11 10:55:04,316 main ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:jtds:sqlserver://localhost:1433/jiradb', driverClassName='net.sourceforge.jtds.jdbc.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=15, minSize=2, maxWait=60000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='null', minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null}} org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Cannot open database "jiradb" requested by the login. The login failed.)

Diagnosis

JIRA fails to start every time (or almost every time) the server is restarted. Any other attempts to start JIRA are successful.

Cause

Because of the parallel nature of service startups in Windows, it is possible (but unusual) that the SQLSERVER service was not fully started by the time the JIRA service was online.

Solution

Workaround

To work around this issue, use services.msc to set the JIRA service to restart the service on failure.

Resolution

Atlassian recommends the greatest possible care when modifying the Windows registry. Be sure to back up your registry before making any changes to it. Incorrect changes to your registry can make your system fully inoperable.

  1. Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<JIRA_service_name>

  2. Add MSSQLSERVER to the REG_MULTI_SZ key DependOnService

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.