JIRA service is installed on the same Windows Server 2003 where SQL Server hosting JIRA database is installed. I already made JIRA service dependent on SQL Server service for startup.
However, after server is restarted when I try to access JIRA in the browser I get:
type Status report
description The requested resource () is not available.
When I look at STDOUT log the reason is clear - it says:
2012-06-02 11:21:38,723 main ERROR [atlassian.jira.startup.LauncherContextListener] Unable to start JIRA.
com.atlassian.jira.exception.DataAccessException: java.sql.SQLException: Cannot open database "JIRA" requested by the login. The login failed.
This is in spite of the fact that I already made JIRA service startup dependent on SQL Server.
Then I restart JIRA service manually and it starts working.
What other service should I make JIRA depended on in order for it to start correctly after reboot?
Is there some kind of "retry connecting to the database if it is not available" setting I can use in JIRA?
I found why making JIRA dependent on SQL Server is not enough.
This is the sequence of events from Event Log:
9:18:16 - OS start
9:18:33 - SQL Server entered running state
9:18:55 - Starting up database JIRA
So JIRA database doesn't become available for 22 seconds after SQL Server enters running state. Apparently JIRA service tries to connect before JIRA database is available.
It takes about 80 seconds for JIRA service to start when database is available.
It takes about 80 seconds for Confluence service to start when database is available (I run Confluence on the same server and it uses JIRA for user authentication).
As a kludge I set JIRA and Confluence services for Manual Startup (they both are made dependent on SQL Server service and Confluence is made dependent on JIRA serivce) and run this Powershell script on OS startup:
Start-Sleep -s 60
sc.exe start JIRA010612193624
Start-Sleep -s 90
sc.exe start Confluence020612094212
If you want to use it for yourself you may need to adjust delays.
The real solution is not to make JIRA/Confluence services dependent on SQL Server service and one another (this is just a kludge) because they may all run on different computers but instead how to make them to retry connection to the database if it fails on startup. This is somewhat different question and deserves it's own post.
you might also try changing the "Startup Type" of the JIRA service from "Automatic" to "Automatic (Delayed)". This will force the JIRA service to wait until all Automatic services have started (plus 120 seconds, by default, although I believe this duration is configurable).
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs