https://issues.rudder.io/https://issues.rudder.io/themes/rudder7/favicon/favicon.ico?17096450182013-10-15T17:51:10ZIssue TrackerRudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=218962013-10-15T17:51:10ZJonathan CLARKEjonathan.clarke@normation.com
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>User story</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>8</i></li><li><strong>Assignee</strong> set to <i>Vincent MEMBRÉ</i></li><li><strong>Target version</strong> changed from <i>2.4.12</i> to <i>2.8.0~rc1</i></li></ul><p>This is important, but not worth disturbing stable code for. Let's add this to 2.8.</p> Rudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=220712013-10-22T15:37:21ZVincent MEMBRÉvme@rudder.io
<ul></ul><p>On any version of Rudder, if a user in xml is missing an attribute, this is not a problem.</p>
<p>You already get a logger error or warning when a field is missing or not correct, and the user is ignored.</p>
<p>However is the XML is not valid at all, and exception is thrown. And we should add a correct message, easy to read, that would b esend to core log (/var/log/rudder/core).</p>
<p>My proposition is:</p>
<pre>
[2013-10-22 17:26:54] ERROR application - Rudder user xml: An error occured while parsing the users xml file, and you won't be able to connect to Rudder webapp until you correct it.
[2013-10-22 17:26:54] ERROR application - Rudder user xml: XML file is not correct, error message is: Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>". (line 105, column 3)
</pre>
<p>instead of</p>
<pre>
[2013-10-22 17:26:54] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoAuthenticationProvider' defined in class path resource [bootstrap/liftweb/AppConfigAuth.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.security.authentication.AuthenticationProvider bootstrap.liftweb.AppConfigAuth.demoAuthenticationProvider()] threw exception; nested exception is org.xml.sax.SAXParseException; lineNumber: 105; columnNumber: 3; Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>".
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.security.authentication.AuthenticationProvider bootstrap.liftweb.AppConfigAuth.demoAuthenticationProvider()] threw exception; nested exception is org.xml.sax.SAXParseException; lineNumber: 105; columnNumber: 3; Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>".
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:169) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
Caused by: org.xml.sax.SAXParseException: Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198) ~[na:1.7.0_03]
2013-10-22 17:26:54.258:WARN::Failed startup of context org.mortbay.jetty.webapp.WebAppContext@11901790{/,/home/vincent/workspace/rudder-project/rudder/rudder-web/src/main/webapp}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoAuthenticationProvider' defined in class path resource [bootstrap/liftweb/AppConfigAuth.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.security.authentication.AuthenticationProvider bootstrap.liftweb.AppConfigAuth.demoAuthenticationProvider()] threw exception; nested exception is org.xml.sax.SAXParseException; lineNumber: 105; columnNumber: 3; Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>".
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftInitContextListener.scala:89)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)
2013-10-22 17:26:54.259:WARN::Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoAuthenticationProvider' defined in class path resource [bootstrap/liftweb/AppConfigAuth.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.security.authentication.AuthenticationProvider bootstrap.liftweb.AppConfigAuth.demoAuthenticationProvider()] threw exception; nested exception is org.xml.sax.SAXParseException; lineNumber: 105; columnNumber: 3; Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>".:
org.xml.sax.SAXParseException; lineNumber: 105; columnNumber: 3; Le type d'élément "user" doit se terminer par la balise de fin correspondante "</user>".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1375)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1708)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2898)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
at scala.xml.factory.XMLLoader$class.loadXML(XMLLoader.scala:40)
at scala.xml.XML$.loadXML(XML.scala:57)
at scala.xml.factory.XMLLoader$class.load(XMLLoader.scala:52)
at scala.xml.XML$.load(XML.scala:57)
at bootstrap.liftweb.AppConfigAuth$.parseUsers(AppConfigAuth.scala:367)
at bootstrap.liftweb.AppConfigAuth.demoAuthenticationProvider(AppConfigAuth.scala:112)
at bootstrap.liftweb.AppConfigAuth$$EnhancerByCGLIB$$e9d6aff.CGLIB$demoAuthenticationProvider$2(<generated>)
at bootstrap.liftweb.AppConfigAuth$$EnhancerByCGLIB$$e9d6aff$$FastClassByCGLIB$$905e35fb.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:280)
at bootstrap.liftweb.AppConfigAuth$$EnhancerByCGLIB$$e9d6aff.demoAuthenticationProvider(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:149)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at bootstrap.liftweb.LiftInitContextListener.contextInitialized(LiftInitContextListener.scala:89)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at runjettyrun.Bootstrap.main(Bootstrap.java:97)
</pre> Rudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=220762013-10-22T16:54:19ZVincent MEMBRÉvme@rudder.io
<ul><li><strong>Subject</strong> changed from <i>When there is a typo in the rudder-users.xml, the applicatin fails to start, and fails to provide meaningful error message</i> to <i>When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error log</i></li></ul> Rudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=221022013-10-23T09:32:39ZVincent MEMBRÉvme@rudder.io
<ul><li><strong>Status</strong> changed from <i>8</i> to <i>13</i></li></ul> Rudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=221032013-10-23T09:32:46ZVincent MEMBRÉvme@rudder.io
<ul><li><strong>Status</strong> changed from <i>13</i> to <i>10</i></li></ul> Rudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=221432013-10-24T10:27:22ZMatthieu CERDAmatthieu.cerda@normation.com
<ul><li><strong>Status</strong> changed from <i>10</i> to <i>Pending release</i></li></ul> Rudder - User story #4079: When Rudder does not start due to an error in rudder-users.xml, the webapp will display an usable error loghttps://issues.rudder.io/issues/4079?journal_id=221592013-10-28T10:22:44ZVincent MEMBRÉvme@rudder.io
<ul><li><strong>Status</strong> changed from <i>Pending release</i> to <i>Released</i></li></ul><p>This bug has been fixed in Rudder 2.8.0~rc1, which was released on Friday 25/10/2013.<br />Check out: </p>
<ul>
<li>The release announcement: <a class="external" href="http://www.rudder-project.org/pipermail/rudder-announce/2013-October/000057.html">http://www.rudder-project.org/pipermail/rudder-announce/2013-October/000057.html</a></li>
<li>The full ChangeLog: <a class="external" href="http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog28">http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog28</a></li>
<li>Download information: <a class="external" href="https://www.rudder-project.org/site/get-rudder/downloads/">https://www.rudder-project.org/site/get-rudder/downloads/</a></li>
</ul>