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

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
Accepted answer

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.

Hi Mikael

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

It should be a system variable.

Peter

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

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

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

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

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

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

0 votes

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.

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

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

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

434 views 6 9
Read article

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