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

This widget could not be displayed.

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.
This widget could not be displayed.

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

This widget could not be displayed.

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?

This widget could not be displayed.

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

This widget could not be displayed.

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.
This widget could not be displayed.

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

This widget could not be displayed.

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 Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,325 views 8 11
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