Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.10.5, 2.11.8
-
None
Description
On startup, the following error occurs and stops Stash from starting up.
2014-07-01 14:16:24,514 ERROR [localhost-startStop-1] c.a.j.s.w.c.JohnsonContextLoaderListener The Spring WebApplicationContext could not be started com.atlassian.stash.user.PreAuthenticationFailedException: Could not pre-authenticate as problematicuser at com.atlassian.stash.internal.user.SecurityServiceImpl.doAsUser(SecurityServiceImpl.java:80) ~[stash-service-impl-2.10.1.jar:na] at com.atlassian.stash.internal.pull.rescope.PullRequestRescopeListener.onApplicationEvent(PullRequestRescopeListener.java:170) ~[stash-service-impl-2.10.1.jar:na] at com.atlassian.stash.internal.pull.rescope.PullRequestRescopeListener.onApplicationEvent(PullRequestRescopeListener.java:63) ~[stash-service-impl-2.10.1.jar:na] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) ~[spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) ~[spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_02] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_02] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_02] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_02] ... 29 frames trimmed
The issue here is that that user updated a branch, which triggered a pull request update. However, Stash didn't get around to performing that update before it shut down. When Stash starts up again, it tries to reschedule those pull request updates as that user. But the user is no longer active, so it fails...
Workaround until this issue is fixed: re-enable/recreate the problematic user in LDAP/Crowd to ensure Stash has started up.