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

Stash error : cant find stash home directory, when using it as an windows service

MikalM September 4, 2013

Hi,

When i run Stash as an windows service i got the error "cant find the stash_home" i have in the enviroment set up the stash_home, and if i do an echo then it prints out the hole path. I also set it in the setenv.bat file, with the same result. If i stop the service and use "start-stash.bat" then it works. But not as an service. I have no spaces in the path way, running 32 bit, on both java and server. Jira is working fine on the same maschine. please help

Mikael

7 answers

1 accepted

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2013

Mikal,

Please have a look at the documentation. Note that when you run Stash as a Windows service

  • it should be run using a non-administrator user account that has read and write access to the Stash home directory and the <Stash installation directory>.
  • When you run Stash as a Windows service, all settings in setenv.bat are ignored. Ensure that you have set STASH_HOME as asystem environment variable.
0 votes
MikalM September 4, 2013

Thanks, i will let our server guy add an user with correct access.

0 votes
MikalM September 4, 2013

When u use my user on the service, then it works, so it must be that the local user have the wrong access rights. Thanks all

cofarrell
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.
September 4, 2013

Hi Mikal,

Just as word of warning, you mentioned admin rights. Have you read this (it's mentioned/linked in the Windows documentation)?

https://confluence.atlassian.com/display/STASHKB/Git+Push+Operations+Extremely+Slow+on+Windows

If you're running as a local user make sure they don't have administrator rights as it will affect the performance of Stash.

Cheers,

Charles

0 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 4, 2013

Mikal,

Please have a look at the documentation. Note that when you run Stash as a Windows service

  • it should be run using a non-administrator user account that has read and write access to the Stash home directory and the <Stash installation directory>.
  • When you run Stash as a Windows service, all settings in setenv.bat are ignored. Ensure that you have set STASH_HOME as asystem environment variable.
0 votes
MikalM September 4, 2013

Yes i have added a new user that only runs the service. And it have admin rights.

0 votes
MikalM September 4, 2013

I have tried them both. In the setenv.bat and enviroment settings on the server as "STASH_HOME" the same result. It does however work if i start it manually. But soon i log out of the server it shuts down, so that's why it needeed to be run at an service

MikalM September 4, 2013

Yes i have added a new user that only runs the service. And it have admin rights.

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 4, 2013

Are you running the service under a dedicated user?

Does this user have all the necessary access rights? (So at least the same rights as you have).

Best regards,

Peter

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 4, 2013

Have you tried to login with that user and check if he can see the stash_home directory variable?

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 4, 2013

Hi Mikael

Is it configured as a system variable or a user variable?

It should be a system variable.

Peter

MikalM September 4, 2013

i have tried them both. In the setenv.bat and enviroment settings on the server as "STASH_HOME" the same result. It does however work if i start it manually. But soon i log out of the server it shuts down, so that's why it needeed to be run at an service

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events