Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56874

Log4j2.xml file in the plugin causes unexpected errors

    Details

    • Similar Issues:

      Description

      I am seeing in the logs big stack traces because the plugin is trying to set up logging on the disk where it does not have access.

      I think the plugin should just remove that file https://github.com/jenkinsci/hpe-application-automation-tools-plugin/blob/latest/src/main/resources/log4j2.xml

      Stack traces:

      2019-02-27 12:38:23,188 pool-9-thread-2 ERROR Unable to create file nga/logs/nga.log java.io.IOException: Could not create directory /nga/logs
      	at org.apache.logging.log4j.core.util.FileUtils.mkdir(FileUtils.java:127)
      	at org.apache.logging.log4j.core.util.FileUtils.makeParentDirs(FileUtils.java:144)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:627)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:608)
      	at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:113)
      	at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:115)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:188)
      	at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:144)
      	at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:60)
      	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249)
      	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
      	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
      	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
      	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:581)
      	at com.microfocus.application.automation.tools.octane.actions.PluginActions.<clinit>(PluginActions.java:55)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.iterator(ExtensionList.java:172)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:486)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.size(ExtensionList.java:191)
      	at hudson.ExtensionList.lookupSingleton(ExtensionList.java:449)
      	at com.cloudbees.jenkins.support.filter.DataFaker.get(DataFaker.java:52)
      	at com.cloudbees.jenkins.support.filter.NameProvider.<clinit>(NameProvider.java:98)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:183)
      	at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1100)
      	at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      
      2019-02-27 12:38:23,209 pool-9-thread-2 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@4fcdc547] unable to create manager for [nga/logs/nga.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@65470c2e[pattern=nga/logs/nga-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=2097152)]), strategy=DefaultRolloverStrategy(min=1, max=10, useMax=true), advertiseURI=null, layout=%d{dd/MM/yyyy HH:mm:ss,SSS} %-5p [%t] - %c{1}: %m%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@4fcdc547] unable to create manager for [nga/logs/nga.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@65470c2e[pattern=nga/logs/nga-%i.log, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=2097152)]), strategy=DefaultRolloverStrategy(min=1, max=10, useMax=true), advertiseURI=null, layout=%d{dd/MM/yyyy HH:mm:ss,SSS} %-5p [%t] - %c{1}: %m%n, filePermissions=null, fileOwner=null]]
      	at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:115)
      	at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:115)
      	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:188)
      	at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:144)
      	at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:60)
      	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249)
      	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
      	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
      	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
      	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:581)
      	at com.microfocus.application.automation.tools.octane.actions.PluginActions.<clinit>(PluginActions.java:55)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.iterator(ExtensionList.java:172)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:486)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.size(ExtensionList.java:191)
      	at hudson.ExtensionList.lookupSingleton(ExtensionList.java:449)
      	at com.cloudbees.jenkins.support.filter.DataFaker.get(DataFaker.java:52)
      	at com.cloudbees.jenkins.support.filter.NameProvider.<clinit>(NameProvider.java:98)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:183)
      	at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1100)
      	at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      
      2019-02-27 12:38:23,211 pool-9-thread-2 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
      	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:229)
      	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249)
      	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
      	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
      	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
      	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:581)
      	at com.microfocus.application.automation.tools.octane.actions.PluginActions.<clinit>(PluginActions.java:55)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.iterator(ExtensionList.java:172)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:486)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.size(ExtensionList.java:191)
      	at hudson.ExtensionList.lookupSingleton(ExtensionList.java:449)
      	at com.cloudbees.jenkins.support.filter.DataFaker.get(DataFaker.java:52)
      	at com.cloudbees.jenkins.support.filter.NameProvider.<clinit>(NameProvider.java:98)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:183)
      	at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1100)
      	at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      
      2019-02-27 12:38:23,236 pool-9-thread-2 ERROR Null object returned for RollingFile in Appenders.
      2019-02-27 12:38:23,287 pool-9-thread-2 ERROR No appender named octaneFileAppender was configured
      Feb 27, 2019 12:38:23 PM hudson.ExtensionFinder$Sezpoz scout
      WARNING: Failed to scout com.microfocus.application.automation.tools.octane.actions.PluginActions
      java.lang.ExceptionInInitializerError
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.iterator(ExtensionList.java:172)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:486)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.size(ExtensionList.java:191)
      	at hudson.ExtensionList.lookupSingleton(ExtensionList.java:449)
      	at com.cloudbees.jenkins.support.filter.DataFaker.get(DataFaker.java:52)
      	at com.cloudbees.jenkins.support.filter.NameProvider.<clinit>(NameProvider.java:98)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:183)
      	at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1100)
      	at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.logging.log4j.core.config.ConfigurationException: No appenders are available for AsyncAppender asyncOctaneFileAppender
      	at org.apache.logging.log4j.core.appender.AsyncAppender.start(AsyncAppender.java:118)
      	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:265)
      	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
      	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
      	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
      	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
      	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:581)
      	at com.microfocus.application.automation.tools.octane.actions.PluginActions.<clinit>(PluginActions.java:55)
      	... 31 more
      
      Feb 27, 2019 12:38:39 PM hudson.ExtensionFinder$Sezpoz scout
      WARNING: Failed to scout com.microfocus.application.automation.tools.octane.actions.PluginActions
      java.lang.NoClassDefFoundError: Could not initialize class com.microfocus.application.automation.tools.octane.actions.PluginActions
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:348)
      	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:684)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:487)
      	at hudson.ExtensionList.load(ExtensionList.java:380)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:183)
      	at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1100)
      	at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
      	at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
      	at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

       

        Attachments

          Activity

          batmat Baptiste Mathus created issue -
          gront Daniel Gront made changes -
          Field Original Value New Value
          Labels octane
          gront Daniel Gront made changes -
          Assignee Daniel Gront [ gront ] Radi Berkovich [ radislavb ]
          amidar Amit Dar made changes -
          Comment [ I'm having the same issue, jenkins 2.164.3 with micro focus plugin 5.8. ]

            People

            • Assignee:
              radislavb Radi Berkovich
              Reporter:
              batmat Baptiste Mathus
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: