Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1136

Jenkins Artifactory Plugin Pipeline Log Missing (intermittently) when running the build on a remote agent

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.1
    • Component/s: None
    • Labels:
      None

      Description

      In some cases the console log in Jenkins is incomplete when using the Jenkins Artifactory plugin when running the build on a slave node. (on the master this behavior does not occur).

      Steps to reproduce:

      1. Create an SSH Slave in Jenkins
      2. Create a pipeline job using our Maven project-example
      3. Edit the pipeline script to fail the build (e.g deploy to a repository which does not exist)
      4. Run the build on the created SSH Slave
      5. You should notice in some case there are log entries missing in build log (examples below)

      complete log:

      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
      [main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Build Order:
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Simple Multi Modules Build
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 1
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 2
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 3
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building Simple Multi Modules Build 3.7-SNAPSHOT
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-clean-plugin:2.5:clean (default-clean) @ multi ---
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-install-plugin:2.4:install (default-install) @ multi ---
      [main] INFO org.codehaus.plexus.PlexusContainer - Installing /var/lib/jenkins/workspace/pipeline-maven/maven-example/pom.xml to /var/lib/jenkins/.m2/repository/org/jfrog/test/multi/3.7-SNAPSHOT/multi-3.7-SNAPSHOT.pom
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building Multi 1 3.7-SNAPSHOT
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-clean-plugin:2.5:clean (default-clean) @ multi1 ---
      [main] INFO org.apache.maven.plugin.clean.CleanMojo - Deleting /var/lib/jenkins/workspace/pipeline-maven/maven-example/multi1/target
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:2.6:resources (default-resources) @ multi1 ---
      [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered resources.
      [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - skip non existing resourceDirectory /var/lib/jenkins/workspace/pipeline-maven/maven-example/multi1/src/main/resources
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.1:compile (default-compile) @ multi1 ---
      [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - Changes detected - recompiling the module!
      [main] INFO org.codehaus.plexus.compiler.javac.JavacCompiler - Compiling 1 source file to /var/lib/jenkins/workspace/pipeline-maven/maven-example/multi1/target/classes
      [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - -------------------------------------------------------------
      [main] ERROR org.apache.maven.plugin.compiler.CompilerMojo - COMPILATION ERROR : 
      [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - -------------------------------------------------------------
      [main] ERROR org.apache.maven.plugin.compiler.CompilerMojo - No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
      [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - 1 error
      [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - -------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Summary:
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Simple Multi Modules Build ......................... SUCCESS [  0.509 s]
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 1 ............................................ FAILURE [  0.728 s]
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 2 ............................................ SKIPPED
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 3 ............................................ SKIPPED
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 1.543 s
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2019-01-17T07:48:48+00:00
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.RuntimeException: Maven build failed
      	at org.jfrog.hudson.pipeline.common.executors.MavenExecutor.execute(MavenExecutor.java:72)
      	at org.jfrog.hudson.pipeline.scripted.steps.ArtifactoryMavenBuild$Execution.run(ArtifactoryMavenBuild.java:78)
      	at org.jfrog.hudson.pipeline.scripted.steps.ArtifactoryMavenBuild$Execution.run(ArtifactoryMavenBuild.java:53)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
      

      Incomplete log:

      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
      [main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Build Order:
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Simple Multi Modules Build
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 1
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 2
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 3
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building Simple Multi Modules Build 3.7-SNAPSHOT
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-clean-plugin:2.5:clean (default-clean) @ multi ---
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-install-plugin:2.4:install (default-install) @ multi ---
      [main] INFO org.codehaus.plexus.PlexusContainer - Installing /var/lib/jenkins/workspace/pipeline-maven/maven-example/pom.xml to /var/lib/jenkins/.m2/repository/org/jfrog/test/multi/3.7-SNAPSHOT/multi-3.7-SNAPSHOT.pom
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -                                                                         
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building Multi 1 3.7-SNAPSHOT
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-clean-plugin:2.5:clean (default-clean) @ multi1 ---
      [main] INFO org.apache.maven.plugin.clean.CleanMojo - Deleting /var/lib/jenkins/workspace/pipeline-maven/maven-example/multi1/target
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:2.6:resources (default-resources) @ multi1 ---
      [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered resources.
      [main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - skip non existing resourceDirectory /var/lib/jenkins/workspace/pipeline-maven/maven-example/multi1/src/main/resources
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
      [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.1:compile (default-compile) @ multi1 ---
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.lang.RuntimeException: Maven build failed
      	at org.jfrog.hudson.pipeline.common.executors.MavenExecutor.execute(MavenExecutor.java:72)
      	at org.jfrog.hudson.pipeline.scripted.steps.ArtifactoryMavenBuild$Execution.run(ArtifactoryMavenBuild.java:78)
      	at org.jfrog.hudson.pipeline.scripted.steps.ArtifactoryMavenBuild$Execution.run(ArtifactoryMavenBuild.java:53)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE
      

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yahavi Yahav Itzhak
                Reporter:
                kfira Kfir Avraham
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: