User story #2883
closedRudder webapps should be able to start even if no LDAP server is available
Description
Rudder's main webapp is now resilient to LDAP disappearing while it's running, and will display nice error messages when no LDAP is available, then run again fine when LDAP comes back.
However it is impossible to start the webapp if no LDAP server is running, we get this in the logs:
This makes running scripts to start services difficult. Can it be changed?
11:12:17.496 [main] INFO b.l.AppConfigAuth$$EnhancerByCGLIB$$33de5f3d - Use configuration file defined by JVM property -Drudder.authFile : /opt/rudder/etc/rudder-users.xml 11:12:18.380 [main] ERROR o.s.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapNodeConfigurationMapper' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.rudder.repository.ldap.LDAPNodeConfigurationMapper bootstrap.liftweb.AppConfig.ldapNodeConfigurationMapper()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackageService' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) ~[spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) ~[spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) ~[spring-web-3.0.3.RELEASE.jar:3.0.3.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) ~[spring-web-3.0.3.RELEASE.jar:3.0.3.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.3.RELEASE.jar:3.0.3.RELEASE] at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftContextInitListener.scala:84) [classes/:na] at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:641) [jetty-server-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:228) [jetty-servlet-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1181) [jetty-webapp-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:584) [jetty-server-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496) [jetty-webapp-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) [jetty-util-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:36) [jetty-deploy-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:180) [jetty-deploy-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:481) [jetty-deploy-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:137) [jetty-deploy-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:137) [jetty-deploy-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:50) [jetty-deploy-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:470) [jetty-util-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:382) [jetty-util-7.2.2.v20101205.jar:7.2.2.v20101205] at org.eclipse.jetty.util.Scanner.scan(Scanner.java:339) [jetty-util-7.2.2.v20101205.jar:7.2.2.v20101205] Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.rudder.repository.ldap.LDAPNodeConfigurationMapper bootstrap.liftweb.AppConfig.ldapNodeConfigurationMapper()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackageService' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] .... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackageService' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] .... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE] ... Caused by: com.unboundid.ldap.sdk.LDAPException: An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:705) ~[unboundid-ldapsdk-2.2.0.jar:2.2.0] ... 2012-09-10 11:12:18.381:WARN::Failed startup of context o.e.j.w.WebAppContext{/rudder,file:/tmp/jetty-127.0.0.1-8080-rudder.war-_rudder-any-/webapp/},/opt/rudder/jetty7/webapps/rudder.war org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapNodeConfigurationMapper' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.rudder.repository.ldap.LDAPNodeConfigurationMapper bootstrap.liftweb.AppConfig.ldapNodeConfigurationMapper()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackageService' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983) ... Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.rudder.repository.ldap.LDAPNodeConfigurationMapper bootstrap.liftweb.AppConfig.ldapNodeConfigurationMapper()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackageService' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:157) ... Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackageService' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.impl.PolicyPackageServiceImpl bootstrap.liftweb.AppConfig.policyPackageService()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyPackagesReader' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.cfclerk.services.PolicyPackagesReader bootstrap.liftweb.AppConfig.policyPackagesReader()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldap' defined in class bootstrap.liftweb.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider bootstrap.liftweb.AppConfig.ldap()] threw exception; nested exception is LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to connect to server localhost:389: java.io.IOException: An error occurred while attempting to establish a connection to server localhost:389: java.net.ConnectException: Connection refused') at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ......
Updated by Jonathan CLARKE about 12 years ago
- Target version changed from 2.4.0~rc1 to 2.4.0~rc2
Updated by François ARMAND about 12 years ago
Before going further, some context: there is two reasons why the LDAP server is required at boot time:
- the LDAP connection manager check that the server is available (pool initialisation, connection authentication checking)
- we do a lot of checking at boot time about LDAP structure: consistency, Technique library initialisation, dyngroup content, etc.
I'm not sure that Spring will let me change the first item, let say it's possible: in that case, we will loose the authentication checking.
The second item can not be easily changed, because a lot of logic take as hypothesis that the bootstrapping action are actually done at startup.
Perhaps we could delay the execution of theses actions ? Or change the action to be "user triggered", from the administration menu ?
So, to answer: that should be possible, but it come at some price.
Updated by Jonathan CLARKE about 12 years ago
- Target version changed from 2.4.0~rc2 to Ideas (not version specific)
François ARMAND wrote:
Before going further, some context: there is two reasons why the LDAP server is required at boot time:
- the LDAP connection manager check that the server is available (pool initialisation, connection authentication checking)
- we do a lot of checking at boot time about LDAP structure: consistency, Technique library initialisation, dyngroup content, etc.I'm not sure that Spring will let me change the first item, let say it's possible: in that case, we will loose the authentication checking.
The second item can not be easily changed, because a lot of logic take as hypothesis that the bootstrapping action are actually done at startup.
Perhaps we could delay the execution of theses actions ? Or change the action to be "user triggered", from the administration menu ?So, to answer: that should be possible, but it come at some price.
OK, thanks, this won't be for 2.4 then.
Updated by Matthieu CERDA about 12 years ago
Would it be possible to make a simple error page, with a "Restart" button to redeploy the Webapp ?
Updated by Jonathan CLARKE over 11 years ago
- Category changed from 11 to Architecture - Code maintenance
Updated by Benoît PECCATTE over 9 years ago
- Has duplicate Bug #4919: security:authorize access="isAnonymous()" added
Updated by François ARMAND over 7 years ago
- Description updated (diff)
(removing some stack trace because it was unreadable)
The solution seems to be in bug #1974. As LDAP and Postgres are mandatory for boot checks for now and the time being, there should be a clean error when something went wrong.
Updated by François ARMAND over 7 years ago
- Tracker changed from Bug to User story
- Subject changed from Rudder webapps won't start if no LDAP server is available to Rudder webapps should be able to start even if no LDAP server is available
In fact, I'm going to keep #1974 as the bug, and change that one into a user story.
Updated by François ARMAND almost 3 years ago
- Status changed from Discussion to Rejected
We choose to not make that possible to validate things, migrate things between version, etc.
But now the error are nicer.