Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Running Stash as a Service

Chris Langridge May 28, 2014

Hello,

I'm quite new to stash so this may sound like a stupid question. :-)

I have recently installed Stash 2.12.3 and have run through the processs to install this as a Windows service. However, whenever i restart the server the service stops and Stash fails to start, so i have to go through the process of running the stop_stash then the start_stash batch files. Then stash opens fine and the windows service then stops (its set to automatic)

I am running the windows service as an admin with the relevanr rights. I have also instsalled the service without any issue and changed the relevant dll's to the 64 bit version. I don't belive its a Java issue as the applicatoon starts when the batch file is run and the env variable is set.

Any ideas/advice wouyld be appreciated

Many Thanks

Chris

4 answers

0 votes
Chris Langridge May 29, 2014

Hi Celso,

Thanks for the feeback but i have now fixed this through the advice received from John.

Thanks

0 votes
Chris Langridge May 29, 2014

Hi John,

This has worked!! I am connecting to aa MYSQL DB and pretty sure the Atlassian documenetation states that the driver needs to be in the home directory and not the instaqll location.

Anyway thanks for the help and advice.

Kind Regards

0 votes
John Reynolds May 29, 2014

Hi Chris,

I had to install the Java JDK (which installs the JRE), and I did so on the C:\Java folder level so there were no space in path issues.

I also set the Stash service to delay start (usually 2 minutes) to allow all services such as MySQL to complete startup.

I found that I had to have system level environment variables for both JAVA_HOME and JAVA_JRE set as listed below in my install notes below.

I also found that the MySQL connector needs to be in a different folder when Stash is started as a service:

https://answers.atlassian.com/questions/140373/stash-as-service-fails-to-find-mysql-driver

Install Java, 64 bit JDK (not JRE) (but with private JRE which comes with the JDK) at

C:\Java\jdk

and

C:\Java\jre

do NOT install with paths which have spaces!

Set up system level environment variables

JAVA_HOME = C:\Java\jdk

JAVA_JRE = C:\Java\jre

Perhaps this might help. I did follow all their recommended steps for creating the user, etc. as it shows in the documentation. Be particularly certain that the user has appropriate rights.

0 votes
CelsoA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2014

Hi there,

Do you have a dedicate user to start Stash service?

Does this user has rights to read/write Stash_Home folder?

You can check the permissions right clicking in the service name and them properties.

There you can set the user who runs the service.

Please give it a try and let me know how it goes.

Also, please check if all steps mentioned on this document were followed:

https://confluence.atlassian.com/display/STASH/Running+Stash+as+a+Windows+service

Regards,

Celso Yoshioka

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events