Making sure Stash starts up on Windows

logoStashPNGI was having a problem where Stash (which was installed as a service) wasn’t starting up properly and giving me a page that made it look like there was a problem with the database.

I have a local MySQL on the same machine as the Stash server, and both that service and the Stash server are set to automatically start up.

Now the only thing I could think was that the Atlassian Stash service was getting started before MySQL was completely up, so I went looking at the dependencies:

C:\Users\rweaver>sc qc AtlassianStash
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: AtlassianStash
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\Atlassian\Stash\3.2.0\bin\tomcat7.exe //RS//AtlassianStash
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : Atlassian Stash AtlassianStash
        DEPENDENCIES       : Tcpip
                           : Afd
        SERVICE_START_NAME : LocalSystem


The dependencies obviously didn’t include the MySQL56.

So I thought the logical thing to do would be to add a dependencies to the MySQL56 service, and then make the Atlassian Stash service dependent on that, so I ran the following:

C:\Users\rweaver>sc config MySQL56 depend= MySQL56/Tcpip/Afd
[SC] ChangeServiceConfig SUCCESS

This makes the service depend on MySQL56, and appears to resolve the issue.

Hi, I’m Rob Weaver