Project

General

Profile

Actions

Bug #23735

closed

Exception when bad input for inventory duration config

Added by François ARMAND about 1 year ago. Updated about 1 year ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Very Small
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

If we use rudder.inventories.pendingChoiceHistoryCleanupLatency.deletedNode=15 (new property in rudder 8.0) in rudder config file, we get at boot:
It should be correctly handled with a nice error message for user. Stopping boot is ok, but it should:
- not lead to an NPE
- have an actionnable message ("unknown input value, you should use '5 days' (units: ms, s, m, h, d and their long format)" for example)

+ related topic:
rudder.batch.reportsCleaner.deleteLogReport.TTL=2x but code wants rudder.batch.reportscleaner.deleteReportLog.TTL
=> normalise to what is in the properties file, ie update code to wait for rudder.batch.reportsCleaner.deleteLogReport.TTL

+ related topic: in the description in sample properties file of rudder.batch.reportscleaner.compliancelevels.delete.TTL, add the fact that 0 means it's disabled.

[2023-11-14T17:58:08.077Z] ERROR FATAL An error happen during Rudder boot. Rudder will stop now. Error: SystemError: Error during initialization of Rudder; cause was: java.lang.ExceptionInInitializerError: null 
 -> com.normation.rudder.domain.logger.ApplicationLogger$.info(ApplicationLogger.scala:48)
java.lang.ExceptionInInitializerError
        at bootstrap.liftweb.RudderConfig$.$anonfun$new$6(RudderConfig.scala:1068)
        at net.liftweb.common.Logger.info(Logging.scala:231)
        at net.liftweb.common.Logger.info$(Logging.scala:231)
        at com.normation.rudder.domain.logger.ApplicationLogger$.info(ApplicationLogger.scala:48)
        at bootstrap.liftweb.RudderConfig$.<clinit>(RudderConfig.scala:1068)
        at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftInitContextListener.scala:134)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1048)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624)
        at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:983)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:900)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:40)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:183)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:516)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:186)
        at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:462)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:58)
        at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:282)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:836)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:802)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:709)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:597)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:158)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
        at org.eclipse.jetty.server.Server.start(Server.java:470)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
        at org.eclipse.jetty.server.Server.doStart(Server.java:415)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$4(XmlConfiguration.java:1872)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1810)
Caused by: java.lang.NumberFormatException: format error 15
        at scala.concurrent.duration.Duration$.apply(Duration.scala:71)
        at bootstrap.liftweb.RudderParsedProperties$.liftedTree44$1(RudderConfig.scala:1035)
        at bootstrap.liftweb.RudderParsedProperties$.<clinit>(RudderConfig.scala:1033)
        ... 45 more
Actions #1

Updated by François ARMAND about 1 year ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Operational - other Techniques | Rudder settings | Plugins
  • Effort required set to Very Small
Actions #2

Updated by Clark ANDRIANASOLO about 1 year ago

  • Subject changed from Exception when bad input for to Exception when bad input for inventory duration config
Actions #3

Updated by François ARMAND about 1 year ago

  • Description updated (diff)
Actions #4

Updated by François ARMAND about 1 year ago

  • Description updated (diff)
Actions #5

Updated by Clark ANDRIANASOLO about 1 year ago

  • Status changed from New to In progress
Actions #6

Updated by Clark ANDRIANASOLO about 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/5178
Actions #7

Updated by Clark ANDRIANASOLO about 1 year ago

  • Status changed from Pending technical review to Pending release
Actions #8

Updated by François ARMAND about 1 year ago

  • Fix check changed from To do to Checked
Actions #9

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.0.4 which was released today.

Actions

Also available in: Atom PDF