Web Browser not responding to Stash

I have just installed Stash with a view to trialling the use with Jira and Git. I have installed it as a Windows Service on a Windows Server 2008 R2 box as per the install instructions ... the service has started successfully. However, when I try to access the URl (http://localhost:7990) it just hangs forever. When I check the log it has the following:

2012-08-07 13:50:16,161 INFO main c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory E: Stash for 2576@UK-JR-01

2012-08-07 13:50:22,198 INFO main c.a.s.i.h.ExtendedAnnotationSessionFactoryBean Building new Hibernate SessionFactory

2012-08-07 13:50:28,360 WARN main c.a.s.i.license.LicenseServiceImpl No license has been configured.

2012-08-07 13:50:33,836 INFO main c.a.s.i.server.ApplicationInfoLogger Starting Stash 1.2.0 (cf5bc63d65 built on Tue Aug 07 14:02:36 BST 2012)

2012-08-07 13:50:33,836 INFO main c.a.s.i.server.ApplicationInfoLogger JVM: Sun Microsystems Inc. Java HotSpot(TM) Client VM 1.6.0_33-b05

2012-08-07 13:50:45,005 INFO Spring executor 3 c.a.stash.ssh.server.SshServer Starting SSH server on port 7999...

2012-08-07 13:50:45,083 INFO Spring executor 3 c.a.stash.ssh.server.SshServer Started SSH server successfully.

2012-08-07 13:50:46,440 INFO main c.a.s.i.scm.PluginScmClientProvider Stash is using git.exe version 1.7.11

2012-08-07 13:50:50,387 ERROR main c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher spring-mvc could not be started

java.lang.OutOfMemoryError: PermGen space

at java.lang.ClassLoader.defineClass1(Native Method) ~ na:1.6.0_33

at java.lang.ClassLoader.defineClassCond(Unknown Source) ~ na:1.6.0_33

at java.lang.ClassLoader.defineClass(Unknown Source) ~ na:1.6.0_33

at java.security.SecureClassLoader.defineClass(Unknown Source) ~ na:1.6.0_33

at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818) ~ catalina.jar:6.0.32

at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) ~ catalina.jar:6.0.32

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) ~ catalina.jar:6.0.32

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) ~ catalina.jar:6.0.32

at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) ~ spring-core-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:417) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1283) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1254) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1331) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:317) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:396) ~ spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:612) ~ spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:446) ~ spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631) ~ spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588) ~ spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645) ~ spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508) ~ spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE

at com.atlassian.johnson.spring.web.servlet.JohnsonDispatcherServlet.initWebApplicationContext(JohnsonDispatcherServlet.java:115) ~ atlassian-johnson-spring-2.0.0.jar:na

at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449) ~ spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE

at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133) ~ spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE

at javax.servlet.GenericServlet.init(GenericServlet.java:212) ~ servlet-api.jar:2.5.MR2

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173) ~ catalina.jar:6.0.32

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) ~ catalina.jar:6.0.32

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420) ~ catalina.jar:6.0.32

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733) ~ catalina.jar:6.0.32

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) ~ catalina.jar:6.0.32

at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) ~ catalina.jar:6.0.32

1 answer

1 accepted

This is the problem:

java.lang.OutOfMemoryError: PermGen space

You will have to increase the PermGen size of your JVM.
This can be done by editing bin/setenv.bat (for Windows) or setenv.sh (for Linux).
Search for

STASH_MAX_PERM_SIZE=256m

and change it to

STASH_MAX_PERM_SIZE=512m

Then try to start Stash again.

I have tried setting this to 512m and even 1024m ... but I still get the same error.

How can you determine if setting has been accepted, when I run the setenv, it just prints out the file contents ... maybe I am doing this bit wrong?

You should not run setenv.bat directly.
Just start Stash as usual, by running start-stash.bat.
This batch file will call other batch files, and setenv.bat will also be executed.

You can check in a running Stash what the settings are by going to Administration > Support > Atlassian Support Tools > System Information > Environment Variables.
The JAVA_OPTS setting should show "-XX:MaxPermSize=512m" (and the other settings).

Hi Mark.

Thank you for the update.

Please let us know if you need anything else :).

Hello Mark.

You can check that by doing the following:

Go to Administration > Support > Atlassian Support Tools

Click on System Information > Environment Variables > Check the <label for="JAVA_OPTS">JAVA_OPTS</label> and verify if the new value is indeed working.

PS: After doing Rene's suggestion remember to restart Stash.

Cheers,

Douglas Fabretti
Atlassian Support

I reinstalled and checked everything from scratch ... it now works.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

169 views 4 8
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