Description
Bamboo setup randomly fails with the following exception:
2011-06-03 14:36:33,895 ERROR [setupDefaultGeneralBackgroundThread] [SetupUtilityBean] Database configuration failed. Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml! java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml! at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:171) at com.atlassian.config.spring.BootstrappedContainerContext.refresh(BootstrappedContainerContext.java:22) at com.atlassian.bamboo.setup.DefaultHibernateConfigurator.refreshSpringContextAndCreateDatabase(DefaultHibernateConfigurator.java:120) at com.atlassian.bamboo.setup.DefaultHibernateConfigurator.configureDatabase(DefaultHibernateConfigurator.java:64) at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.bootstrapDatabase(DefaultAtlassianBootstrapManager.java:253) at com.atlassian.bamboo.setup.DefaultBootstrapManager.bootstrapDatabase(DefaultBootstrapManager.java:270) at com.atlassian.bamboo.ww2.actions.setup.SetupUtilityBean.setupStandardDatabase(SetupUtilityBean.java:148) at com.atlassian.bamboo.ww2.actions.setup.SetupUtilityBean.setupEmbeddedDatabase(SetupUtilityBean.java:139) at com.atlassian.bamboo.ww2.actions.setup.SetupDefaultsAction.doDatabase(SetupDefaultsAction.java:69) at com.atlassian.bamboo.ww2.actions.setup.SetupDefaultsAction.doGeneral(SetupDefaultsAction.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358) at com.opensymphony.xwork.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:218) at com.opensymphony.webwork.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:35) at java.lang.Thread.run(Thread.java:662) 2011-06-03 14:36:33,896 ERROR [setupDefaultGeneralBackgroundThread] [SetupDefaultsAction] Database setup failed. 2011-06-03 14:36:34,200 INFO [setupDefaultGeneralBackgroundThread] [SetupDefaultsAction] Database setup complete.
After this happens, the Bamboo home directory has to be deleted and setup has to be started again (and it may fail - again).
This gives a rather bad first impression of Bamboo
The problem seems to be caused by the fact that after starting setup action as a WW background process in a session, subsequent poll requests are directed at a different session. This does not always happen, but once it happens, the action will be executed twice - in case of database setup, this is pretty bad.
The problem may also affect other parts of Bamboo.
Attachments
Issue Links
- is related to
-
BAM-8724 After a few logins, user is locked out of the Bamboo console
- Closed