Project

General

Profile

Actions

Bug #2288

closed

It seems that after a reboot, Rudder can't be started because of slapd which is not launched

Added by Nicolas PERRON about 12 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Assignee:
Nicolas PERRON
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

After a reboot, Rudder isn't started and below is the output in /var/log/rudder/webapp/X.log:

2012-02-15 18:11:11.912:INFO::jetty-7.2.2.v20101205
2012-02-15 18:11:11.958:INFO::Deployment monitor /opt/rudder/jetty7/webapps at interval 1
2012-02-15 18:11:11.976:INFO::Deployable added: /opt/rudder/jetty7/webapps/async-rest
2012-02-15 18:11:12.915:INFO::Deployable added: /opt/rudder/jetty7/webapps/endpoint.war
2012-02-15 18:11:13.134:INFO::Copying WEB-INF/lib jar:file:/opt/rudder/jetty7/webapps/endpoint.war!/WEB-INF/lib/ to /tmp/jetty-127.0.0.1-8080-endpoint.war-_endpoint-any-/webinf/WEB-INF/lib
2012-02-15 18:11:14.360:INFO::Copying WEB-INF/classes from jar:file:/opt/rudder/jetty7/webapps/endpoint.war!/WEB-INF/classes/ to /tmp/jetty-127.0.0.1-8080-endpoint.war-_endpoint-any-/webinf/WEB-INF/classes
Use configuration file defined by JVM property -Dlogback.configurationFile : /opt/rudder/etc/logback.xml
2012-02-15 18:11:18.414:INFO:endpoint:Initializing Spring FrameworkServlet 'dispatcher'
18:11:19.111 [main]            INFO  c.n.i.p.e.c.PropertyPlaceholderConfig - Use configuration file defined by JVM property -Dinventoryweb.configFile : /opt/rudder/etc/inventory-web.properties
18:11:20.075 [main]            ERROR o.s.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapConnectionProvider' defined in class com.normation.inventory.provisioning.endpoint.config.AppConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider com.normation.inventory.provisioning.endpoint.config.AppConfig.ldapConnectionProvider()] 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.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442) ~[spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458) ~[spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339) ~[spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306) ~[spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
        at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127) [spring-webmvc-3.0.5.RELEASE.jar:3.0.5.RELEASE]
        at javax.servlet.GenericServlet.init(GenericServlet.java:241) [servlet-api-2.5.jar:na]
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:432) [jetty-servlet-7.2.2.v20101205.jar:7.2.2.v20101205]
        at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260) [jetty-servlet-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.servlet.ServletHandler.initialize(ServletHandler.java:762) [jetty-servlet-7.2.2.v20101205.jar:7.2.2.v20101205]
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:244) [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]
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.normation.ldap.sdk.PooledSimpleAuthConnectionProvider com.normation.inventory.provisioning.endpoint.config.AppConfig.ldapConnectionProvider()] 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')

This is on SLES 11 SP1. It could be the same on Debian.

Actions #1

Updated by Nicolas PERRON about 12 years ago

  • Description updated (diff)
Actions #2

Updated by Jonathan CLARKE about 12 years ago

  • Assignee changed from Jonathan CLARKE to Nicolas PERRON

I guess this may be to do with the order the daemons are started in? Nicolas can you investigate please?

Actions #3

Updated by Nicolas PERRON about 12 years ago

  • Status changed from New to Discussion

Rudder webapp needs LDAP and Postgres servers to be run but it seems that init script order try to launch Jetty before them at startup.

On SLES:

# ls -lh /etc/rc.d/rc*.d/S*jetty*
lrwxrwxrwx 1 root root 8 déc. 30 14:18 /etc/rc.d/rc3.d/S07jetty -> ../jetty
lrwxrwxrwx 1 root root 8 déc. 30 14:18 /etc/rc.d/rc5.d/S07jetty -> ../jetty

# ls -lh /etc/rc.d/rc*.d/S*slapd*
lrwxrwxrwx 1 root root 8 déc. 30 14:18 /etc/rc.d/rc2.d/S09slapd -> ../slapd
lrwxrwxrwx 1 root root 8 déc. 30 14:18 /etc/rc.d/rc3.d/S09slapd -> ../slapd
lrwxrwxrwx 1 root root 8 déc. 30 14:18 /etc/rc.d/rc4.d/S09slapd -> ../slapd
lrwxrwxrwx 1 root root 8 déc. 30 14:18 /etc/rc.d/rc5.d/S09slapd -> ../slapd

# ls -lh /etc/rc.d/rc*.d/S*postgres*
lrwxrwxrwx 1 root root 13 oct. 12  2011 /etc/rc.d/rc3.d/S07postgresql -> ../postgresql
lrwxrwxrwx 1 root root 13 oct. 12  2011 /etc/rc.d/rc5.d/S07postgresql -> ../postgresql

On Debian:

# ls -lh /etc/rc*.d/S*jetty*
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc2.d/S19jetty -> ../init.d/jetty
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc3.d/S19jetty -> ../init.d/jetty
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc4.d/S19jetty -> ../init.d/jetty
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc5.d/S19jetty -> ../init.d/jetty

# ls -lh /etc/rc*.d/S*slapd*
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc2.d/S19slapd -> ../init.d/slapd
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc3.d/S19slapd -> ../init.d/slapd
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc4.d/S19slapd -> ../init.d/slapd
lrwxrwxrwx 1 root root 15 Jan 25 18:29 /etc/rc5.d/S19slapd -> ../init.d/slapd

# ls -lh /etc/rc*.d/S*postgres*
lrwxrwxrwx 1 root root 20 Jan 25 18:28 /etc/rc2.d/S19postgresql -> ../init.d/postgresql
lrwxrwxrwx 1 root root 20 Jan 25 18:28 /etc/rc3.d/S19postgresql -> ../init.d/postgresql
lrwxrwxrwx 1 root root 20 Jan 25 18:28 /etc/rc4.d/S19postgresql -> ../init.d/postgresql
lrwxrwxrwx 1 root root 20 Jan 25 18:28 /etc/rc5.d/S19postgresql -> ../init.d/postgresql

Should we modify LSB in each of these init scripts ?

Actions #4

Updated by Nicolas PERRON about 12 years ago

  • Status changed from Discussion to Pending technical review
  • % Done changed from 0 to 100

Applied in changeset commit:e491f629a8b30c22eb0f45cdd3ba845f193cfa87.

Actions #5

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from Pending technical review to Released

Looks good to me

Actions #6

Updated by Nicolas PERRON about 11 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #7

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF