Actions
Bug #19586
closedBug #19567: Rudder fails to stop on boot error
Parent task failed to stop jetty when ldap connection is down at boot
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
Description
In parent ticket, we handled the case when a bootcheck fails, and it now correctly stop rudder.
But if the LDAP connection (or postgres, or certainly other sources of fatal errors at boot) is down, jetty does not stop while it should.
Updated by François ARMAND over 3 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND over 3 years ago
The problem seems to be that we use "orDie" for that, and ZIO handle these error with a log, but without failing (really killing) the app.
But it seems to be a bit more, because the init exception does not trigger the exception handler either.
[2021-07-27 13:56:32+0200] INFO application - Starting Rudder 6.1.16-SNAPSHOT web application [build timestamp: 2021-07-27T11:53:09Z] Fiber failed. An unchecked error was produced. bootstrap.liftweb.RudderConfig$InitError: An error occured when testing for LDAP connection: BackendException: An error occured; cause was: java.lang.Error: Error during LDAP connection pool initialisation. Exception: LDAPException:An error occurred while attempting to connect to server localhost:1389: IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:1389: ConnectException(Connection refused (Connection refused)), ldapSDKVersion=5.0.1, revision=3290ee33d4aa17df1aadb4d814d6534375f395a9')); Details: null -> com.normation.ldap.sdk.PooledConnectionProvider.liftedTree1$1(LDAPConnectionProvider.scala:248) -> com.normation.ldap.sdk.PooledConnectionProvider.pool(LDAPConnectionProvider.scala:239) -> com.normation.ldap.sdk.PooledConnectionProvider.pool$(LDAPConnectionProvider.scala:239) Fiber:Id(1627386992763,0) was supposed to continue to: a future continuation at bootstrap.liftweb.RudderConfig$.new(RudderConfig.scala:607) Fiber:Id(1627386992763,0) execution trace: at zio.ZIO.orDieWith(ZIO.scala:969) at bootstrap.liftweb.RudderConfig$.new(RudderConfig.scala:611) Fiber:Id(1627386992763,0) was spawned by: <empty trace> [2021-07-27 13:56:33+0200] WARN org.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext@74e47444{/rudder-web,file:///home/fanf/java/workspaces/rudder-project/rudder/webapp/sources/rudder/rudder-web/src/main/webapp/,UNAVAILABLE}{file:///home/fanf/java/workspaces/rudder-project/rudder/webapp/sources/rudder/rudder-web/src/main/webapp/} java.lang.ExceptionInInitializerError: null at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftInitContextListener.scala:127) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1002) at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553) at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:931) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:764) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:360) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:844) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.server.Server.start(Server.java:408) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.Server.doStart(Server.java:372) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) at org.eclipse.jetty.runner.Runner.run(Runner.java:520) at org.eclipse.jetty.runner.Runner.main(Runner.java:565) Caused by: zio.FiberFailure: Fiber failed. An unchecked error was produced. bootstrap.liftweb.RudderConfig$InitError: An error occured when testing for LDAP connection: BackendException: An error occured; cause was: java.lang.Error: Error during LDAP connection pool initialisation. Exception: LDAPException:An error occurred while attempting to connect to server localhost:1389: IOException(LDAPException(resultCode=91 (connect error), errorMessage='An error occurred while attempting to establish a connection to server localhost/127.0.0.1:1389: ConnectException(Connection refused (Connection refused)), ldapSDKVersion=5.0.1, revision=3290ee33d4aa17df1aadb4d814d6534375f395a9')); Details: null -> com.normation.ldap.sdk.PooledConnectionProvider.liftedTree1$1(LDAPConnectionProvider.scala:248) -> com.normation.ldap.sdk.PooledConnectionProvider.pool(LDAPConnectionProvider.scala:239) -> com.normation.ldap.sdk.PooledConnectionProvider.pool$(LDAPConnectionProvider.scala:239) Fiber:Id(1627386992763,0) was supposed to continue to: a future continuation at bootstrap.liftweb.RudderConfig$.new(RudderConfig.scala:607) Fiber:Id(1627386992763,0) execution trace: at zio.ZIO.orDieWith(ZIO.scala:969) at bootstrap.liftweb.RudderConfig$.new(RudderConfig.scala:611) Fiber:Id(1627386992763,0) was spawned by: <empty trace> [2021-07-27 13:56:33+0200] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@9ed238c{HTTP/1.1, (http/1.1)}{0.0.0.0:8082} [2021-07-27 13:56:33+0200] INFO org.eclipse.jetty.server.Server - Started @7590ms
Updated by François ARMAND over 3 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder/pull/3739
Updated by François ARMAND over 3 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|816f7522c09dcb2d487cfb0fa2f311b0b5e48347.
Updated by Nicolas CHARLES over 3 years ago
- Fix check changed from To do to Checked
and it stops also when it gets down during normal operation
Updated by Vincent MEMBRÉ over 3 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.1.16 and 6.2.10 which were released today.
Actions