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

withMaven parses emtpy EventSpy logfiles

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The maven pipeline plugin in version 2.0 tries to parse an empty event spy logfile and logs error messages because of that (that is fine).

      Calling withMaven() should not even try to parse any log files from the event spy if the event spy has been disabled via one of the two options available for that.

      In my case I disabled the event spy via setting the environment variable JENKINS_MAVEN_AGENT_DISABLED to "true". In this case no valid log file is created and the MavenSpyLogProcessor can't process it so it should not even try it.

       

       

        Attachments

          Issue Links

            Activity

            Hide
            cleclerc Cyrille Le Clerc added a comment -
            Show
            cleclerc Cyrille Le Clerc added a comment - FYI JENKINS-43491 will help to diagnose See https://github.com/jenkinsci/pipeline-maven-plugin/pull/38
            Show
            cleclerc Cyrille Le Clerc added a comment - See  https://github.com/jenkinsci/pipeline-maven-plugin/pull/39
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Fixed in 2.0.2

            Show
            cleclerc Cyrille Le Clerc added a comment - Fixed in 2.0.2
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Jannis Oeltjen can you confirm that version 2.0.2 fixes your problem?

            By the way, can you explain us why you disabled the Maven Event Spy? Did you face problems with it?

            Show
            cleclerc Cyrille Le Clerc added a comment - Jannis Oeltjen can you confirm that version 2.0.2 fixes your problem? By the way, can you explain us why you disabled the Maven Event Spy? Did you face problems with it?
            Hide
            jcoeltjen Jannis Oeltjen added a comment -

            Seems to work now! Thanks!

            I disabled the Maven Event Spy temporarily because our build pipelines had some problems with it.
            The builds did not fail but the logs were flooded with error messages.
            At this point we did not really needed the event spy because we published all relevant information via other plugins, so I disabled the event spy.
            Right now we are using the Artifactory Plugin to publish build information to our I cannot really test the new versions in production anymore.

            I attached some logs that show the problem I described:

            ERROR: [withMaven] WARNING Exception processing the logs generated by the Jenkins Maven Event Spy D:\slave\ws\xx\xx\xxxx\trunk@0\ws@tmp\withMaven93c2492e\maven-spy-20170331-085547-247.log, ignore file.  Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org 
            java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: Error writing to tar file from: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxx-0.1.0-SNAPSHOT.jar
            	at hudson.FilePath.copyRecursiveTo(FilePath.java:2215)
            	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
            	at org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter.process(GeneratedArtifactsReporter.java:97)
            	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:94)
            	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:770)
            	at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114)
            	at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362)
            	at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73)
            	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146)
            	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
            	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
            	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
            	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
            	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
            	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
            	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
            	at java.util.concurrent.FutureTask.run(Unknown Source)
            	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
            	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
            	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            	at java.util.concurrent.FutureTask.run(Unknown Source)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            	at java.lang.Thread.run(Unknown Source)
            Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Error writing to tar file from: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxx.jar
            	at hudson.remoting.Channel$2.adapt(Channel.java:854)
            	at hudson.remoting.Channel$2.adapt(Channel.java:849)
            	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55)
            	at hudson.FilePath.copyRecursiveTo(FilePath.java:2213)
            	... 27 more
            Caused by: java.io.IOException: Error writing to tar file from: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxxjar
            	at hudson.util.io.TarArchiver.visit(TarArchiver.java:110)
            	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
            	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2804)
            	at hudson.FilePath.writeToTar(FilePath.java:2251)
            	at hudson.FilePath.access$2100(FilePath.java:195)
            	at hudson.FilePath$45.invoke(FilePath.java:2194)
            	at hudson.FilePath$45.invoke(FilePath.java:2190)
            	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            	at hudson.remoting.Request$2.run(Request.java:336)
            	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            	at java.util.concurrent.FutureTask.run(Unknown Source)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            	at hudson.remoting.Engine$1$1.run(Engine.java:94)
            	at java.lang.Thread.run(Unknown Source)
            	at ......remote call to Channel to /191.0.1.78(Native Method)
            	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
            	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            	at hudson.remoting.Channel$2.adapt(Channel.java:852)
            	... 30 more
            Caused by: java.io.FileNotFoundException: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxx-0.1.0-SNAPSHOT.jar (The filename, directory name, or volume label syntax is incorrect)
            	at java.io.FileInputStream.open0(Native Method)
            	at java.io.FileInputStream.open(Unknown Source)
            	at java.io.FileInputStream.<init>(Unknown Source)
            	at hudson.util.io.TarArchiver.visit(TarArchiver.java:103)
            	at hudson.util.DirScanner.scanSingle(DirScanner.java:49)
            	at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2804)
            	at hudson.FilePath.writeToTar(FilePath.java:2251)
            	at hudson.FilePath.access$2100(FilePath.java:195)
            	at hudson.FilePath$45.invoke(FilePath.java:2194)
            	at hudson.FilePath$45.invoke(FilePath.java:2190)
            	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            	at hudson.remoting.Request$2.run(Request.java:336)
            	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            	at java.util.concurrent.FutureTask.run(Unknown Source)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            	at hudson.remoting.Engine$1$1.run(Engine.java:94)
            	... 1 more
            
            Show
            jcoeltjen Jannis Oeltjen added a comment - Seems to work now! Thanks! I disabled the Maven Event Spy temporarily because our build pipelines had some problems with it. The builds did not fail but the logs were flooded with error messages. At this point we did not really needed the event spy because we published all relevant information via other plugins, so I disabled the event spy. Right now we are using the Artifactory Plugin to publish build information to our I cannot really test the new versions in production anymore. I attached some logs that show the problem I described: ERROR: [withMaven] WARNING Exception processing the logs generated by the Jenkins Maven Event Spy D:\slave\ws\xx\xx\xxxx\trunk@0\ws@tmp\withMaven93c2492e\maven-spy-20170331-085547-247.log, ignore file. Please report a bug associated for the component 'pipeline-maven-plugin' at https://issues.jenkins-ci.org java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: Error writing to tar file from: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxx-0.1.0-SNAPSHOT.jar at hudson.FilePath.copyRecursiveTo(FilePath.java:2215) at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61) at org.jenkinsci.plugins.pipeline.maven.reporters.GeneratedArtifactsReporter.process(GeneratedArtifactsReporter.java:97) at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:94) at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution$Callback.finished(WithMavenStepExecution.java:770) at org.jenkinsci.plugins.workflow.steps.BodyExecutionCallback$TailCall.onSuccess(BodyExecutionCallback.java:114) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$SuccessAdapter.receive(CpsBodyExecution.java:362) at com.cloudbees.groovy.cps.Outcome.resumeFrom(Outcome.java:73) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:146) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64) at java.util.concurrent.FutureTask.run(Unknown Source) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Error writing to tar file from: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxx.jar at hudson.remoting.Channel$2.adapt(Channel.java:854) at hudson.remoting.Channel$2.adapt(Channel.java:849) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at hudson.FilePath.copyRecursiveTo(FilePath.java:2213) ... 27 more Caused by: java.io.IOException: Error writing to tar file from: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxxjar at hudson.util.io.TarArchiver.visit(TarArchiver.java:110) at hudson.util.DirScanner.scanSingle(DirScanner.java:49) at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2804) at hudson.FilePath.writeToTar(FilePath.java:2251) at hudson.FilePath.access$2100(FilePath.java:195) at hudson.FilePath$45.invoke(FilePath.java:2194) at hudson.FilePath$45.invoke(FilePath.java:2190) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Unknown Source) at ......remote call to Channel to /191.0.1.78(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel$2.adapt(Channel.java:852) ... 30 more Caused by: java.io.FileNotFoundException: D:\slave\ws\xx\xx\xxxx\trunk@0\ws\D:\slave\ws\xx\xx\xxxx\trunk@0\ws\xxx\target\xxx-0.1.0-SNAPSHOT.jar (The filename, directory name, or volume label syntax is incorrect) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at hudson.util.io.TarArchiver.visit(TarArchiver.java:103) at hudson.util.DirScanner.scanSingle(DirScanner.java:49) at hudson.FilePath$ExplicitlySpecifiedDirScanner.scan(FilePath.java:2804) at hudson.FilePath.writeToTar(FilePath.java:2251) at hudson.FilePath.access$2100(FilePath.java:195) at hudson.FilePath$45.invoke(FilePath.java:2194) at hudson.FilePath$45.invoke(FilePath.java:2190) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:94) ... 1 more
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Thanks Jannis Oeltjen. Your FileNotFound problem is tracked at JENKINS-43617 and JENKINS-43652.

            Show
            cleclerc Cyrille Le Clerc added a comment - Thanks Jannis Oeltjen . Your FileNotFound problem is tracked at  JENKINS-43617 and  JENKINS-43652 .

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                jcoeltjen Jannis Oeltjen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: