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

Windows Exception processing the logs generated by the Jenkins Maven Event Spy

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Note: our build completes with SUCCESS without error or warnings on a Linux build agent.  The build completes with SUCCESS and the same outputs (except the missing non-archived pom.xml files) as the Linux build but has the warning messages displayed below.

      When running a withMaven build from a sh() build step on Windows:

      withMaven(jdk: config['jdk'], maven: config['maven'], mavenLocalRepo: config['mavenLocalRepo'], mavenSettingsConfig: config['mavenSettingsConfig']) \{
      
      sh('''\\
      
      if [[ -e "pom.xml" ]]; then
          # Run Jenkins maven wrapper script using mvn in Unix bash or mvn.cmd in cmd.exe from     Git for Windows bash
          if [[ -z "$COMSPEC" ]]; then
              cmd=(mvn)
          else
              cmd=("$COMSPEC" //c mvn.cmd)
          fi
          args=(--batch-mode -U -V --settings "$MVN_SETTINGS" clean install -P "$BUILD_PROFILE" \\
              "-DxlDeployServerAddress=$XLDEPLOY_SERVER_ADDRESS" "-DxlDeployPort=$XLDEPLOY_PORT" \\
              "-DxlDeploySecured=$XLDEPLOY_SECURED" "-DbuildUrl=$BUILD_URL")
          eval $(printf " %q" "$\{cmd[@]}" "$\{args[@]}")
       fi''')
      
      }
      

      We get the following error.  Note that the path that is generated for the archived pom.xml file by the 'pipeline-maven-plugin' is in correct in that it duplicates the directory prefix (C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ) twice.  See below:

       

      ERROR: [withMaven] WARNING Exception processing the logs generated by the Jenkins Maven Event Spy C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ@tmp\withMavenf5b2ab19\maven-spy-20170505-120300-155.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: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml
      	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:99)
      	at org.jenkinsci.plugins.pipeline.maven.MavenSpyLogProcessor.processMavenSpyLogs(MavenSpyLogProcessor.java:101)
      	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(FutureTask.java:266)
      	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(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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: java.util.concurrent.ExecutionException: java.io.IOException: Error writing to tar file from: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml
      	at hudson.remoting.Channel$2.adapt(Channel.java:862)
      	at hudson.remoting.Channel$2.adapt(Channel.java:857)
      	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: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml 
      	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(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Thread.java:745)
      	at ......remote call to JNLP4-connect connection from hlbwbdgtd101.corp.standard.com/192.168.137.149:50719(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel$2.adapt(Channel.java:860) ... 30 more 
      Caused by: java.io.FileNotFoundException: C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\C:\Jenkins\workspace\EJBOSSDeployTestDev_develop-2OFPXUJSF6HFU25YUKSWFWG43K6VCJBQJOLEUCRP2WYWTF57AETQ\BREJBOSSDeployTestDevWeb\pom.xml (The filename, directory name, or volume label syntax is incorrect)
      	 at java.io.FileInputStream.open0(Native Method)
      	 at java.io.FileInputStream.open(FileInputStream.java:195)
      	 at java.io.FileInputStream.<init>(FileInputStream.java:138)
      	 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(FutureTask.java:266)
      	 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	 at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	 ... 1 more
      

        Attachments

        1. log.txt
          1.12 MB
        2. log.txt
          1.11 MB
        3. pipeline-maven-20170510-1407.hpi
          1.09 MB
        4. pipeline-maven-2017-05-12-00-23.hpi
          1.09 MB

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
            jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/ec2196124d464d3abac3b4d22128ae1aec4338fc
            Log:
            JENKINS-44088 Support edge case where the workspace filePath on Windows uses “/“ instead of “\”

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtilsTest.java http://jenkins-ci.org/commit/pipeline-maven-plugin/ec2196124d464d3abac3b4d22128ae1aec4338fc Log: JENKINS-44088 Support edge case where the workspace filePath on Windows uses “/“ instead of “\”
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Cyrille Le Clerc
            Path:
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/reporters/GeneratedArtifactsReporter.java
            jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java
            http://jenkins-ci.org/commit/pipeline-maven-plugin/1ee0a61fb6086a9a5e9ce2e26297c0eda5b41430
            Log:
            JENKINS-44088 better troubleshooting messages

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Cyrille Le Clerc Path: jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/reporters/GeneratedArtifactsReporter.java jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java http://jenkins-ci.org/commit/pipeline-maven-plugin/1ee0a61fb6086a9a5e9ce2e26297c0eda5b41430 Log: JENKINS-44088 better troubleshooting messages
            Hide
            flstaats Frederick Staats added a comment -

            Validated that 2.2.1 through the normal update channel is working.

            Show
            flstaats Frederick Staats added a comment - Validated that 2.2.1 through the normal update channel is working.
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Fixed in 2.2.1

            Show
            cleclerc Cyrille Le Clerc added a comment - Fixed in 2.2.1
            Hide
            flstaats Frederick Staats added a comment -

            I had already downloaded the latest master branch (f1a4d3c Cyrille Le Clerc <cleclerc@cloudbees.com> on 5/11/2017 at 12:59 PM just before you sent your update above) to do a local build to see if I could dig deeper myself.  I spent a couple of hours trying to get the unit tests working inside our corporate firewall (without success), but was able to build the plugin it without running the unit tests.

            My locally built pipeline-maven.hpi based on your latest code update does indeed seem to resolve the issue on both your test case and on the internal build that brought this issue to our attention.  I also tested builds without problem on our Linux build agents.

            Show
            flstaats Frederick Staats added a comment - I had already downloaded the latest master branch (f1a4d3c Cyrille Le Clerc <cleclerc@cloudbees.com> on 5/11/2017 at 12:59 PM just before you sent your update above) to do a local build to see if I could dig deeper myself.  I spent a couple of hours trying to get the unit tests working inside our corporate firewall (without success), but was able to build the plugin it without running the unit tests. My locally built pipeline-maven.hpi based on your latest code update does indeed seem to resolve the issue on both your test case and on the internal build that brought this issue to our attention.  I also tested builds without problem on our Linux build agents.

              People

              • Assignee:
                cleclerc Cyrille Le Clerc
                Reporter:
                flstaats Frederick Staats
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: