Running Stash as a Service

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

This widget could not be displayed.

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

This widget could not be displayed.

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.

This widget could not be displayed.

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

This widget could not be displayed.

Hi Celso,

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

Thanks

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

270 views 14 2
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you