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

Fail to publish Dependency-Track result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 2.7.2
      Dependency-Check Plugin 1.3.2
      Java 1.8.1
      Run from slave server
    • Similar Issues:

      Description

      [DependencyTrack] Publishing artifact to Dependency-Track
      ERROR: Build step failed with exception
      java.lang.NullPointerException
      at hudson.tasks.Publisher.getDescriptor(Publisher.java:122)
      at hudson.tasks.Recorder.getDescriptor(Recorder.java:51)
      at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.getDescriptor(DependencyTrackPublisher.java:205)
      at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.upload(DependencyTrackPublisher.java:167)
      at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.access$100(DependencyTrackPublisher.java:56)
      at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher$1.call(DependencyTrackPublisher.java:120)
      at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher$1.call(DependencyTrackPublisher.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:181)
      at hudson.remoting.UserRequest.perform(UserRequest.java:52)
      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:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at hudson.remoting.Engine$1$1.run(Engine.java:98)
      at java.lang.Thread.run(Thread.java:748)
      at ......remote call to JNLP4-connect connection from *..*./ **..*.*:35432(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:281)
      at hudson.remoting.Channel.call(Channel.java:839)
      at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.perform(DependencyTrackPublisher.java:118)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:730)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
      at hudson.model.Run.execute(Run.java:1760)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:415)
      Build step 'Publish results to Dependency-Track' marked build as failure

        Attachments

          Activity

          Hide
          johnsonqu Johnson Qu added a comment -

          Sorry that it's caused by Ngnix conf before Dependency-Track docker. I updated the size limited, so it resolved the issue. Thanks anyway.

          Show
          johnsonqu Johnson Qu added a comment - Sorry that it's caused by Ngnix conf before Dependency-Track docker. I updated the size limited, so it resolved the issue. Thanks anyway.
          Hide
          johnsonqu Johnson Qu added a comment -

          Thanks Steve.

          I upgraded the plugin version to 1.3.2.1, but now I encountered another issue as below.

           
          [DependencyTrack] Publishing artifact to Dependency-Track
          [DependencyTrack] Could not connect to Dependency-Track. Received response code: 413 Request Entity Too Large
          Build step 'Publish results to Dependency-Track' changed build result to FAILURE

          Show
          johnsonqu Johnson Qu added a comment - Thanks Steve. I upgraded the plugin version to 1.3.2.1, but now I encountered another issue as below.   [DependencyTrack] Publishing artifact to Dependency-Track [DependencyTrack] Could not connect to Dependency-Track. Received response code: 413 Request Entity Too Large Build step 'Publish results to Dependency-Track' changed build result to FAILURE
          Hide
          sspringett Steve Springett added a comment -

          Thanks for reporting the issue. I've pushed an updated release which resolves this issue (and a few others).

           

          Version 3.1.2.1 will show up in the Jenkins update site in a few hours. Or it can be downloaded and manually installed without waiting for the update site to sync.

           

          https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/dependency-check-jenkins-plugin/3.1.2.1/dependency-check-jenkins-plugin-3.1.2.1.hpi

           

          Change log: https://wiki.jenkins.io/display/JENKINS/OWASP+Dependency-Check+Plugin

          Show
          sspringett Steve Springett added a comment - Thanks for reporting the issue. I've pushed an updated release which resolves this issue (and a few others).   Version 3.1.2.1 will show up in the Jenkins update site in a few hours. Or it can be downloaded and manually installed without waiting for the update site to sync.   https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/dependency-check-jenkins-plugin/3.1.2.1/dependency-check-jenkins-plugin-3.1.2.1.hpi   Change log:  https://wiki.jenkins.io/display/JENKINS/OWASP+Dependency-Check+Plugin
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: stevespringett
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/DependencyCheck/DependencyTrackPublisher.java
          src/main/webapp/help-dt-projectid.html
          http://jenkins-ci.org/commit/dependency-check-plugin/3776f5f1d591585634cbb295f624b5c41b701259
          Log:
          Fix for JENKINS-51053. FilePath is accessible from master or slave. No need to force execution on slave. Simplified. Added verbage to doc regarding permissions. Updated version to 3.1.2.1

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: stevespringett Path: pom.xml src/main/java/org/jenkinsci/plugins/DependencyCheck/DependencyTrackPublisher.java src/main/webapp/help-dt-projectid.html http://jenkins-ci.org/commit/dependency-check-plugin/3776f5f1d591585634cbb295f624b5c41b701259 Log: Fix for JENKINS-51053 . FilePath is accessible from master or slave. No need to force execution on slave. Simplified. Added verbage to doc regarding permissions. Updated version to 3.1.2.1 * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
          Hide
          sspringett Steve Springett added a comment -

          I've confirmed this to be a defect in the Jenkins plugin. Publishing works as expected when executing from the master node but fails with an NullPointerException when running from a slave.

          Show
          sspringett Steve Springett added a comment - I've confirmed this to be a defect in the Jenkins plugin. Publishing works as expected when executing from the master node but fails with an NullPointerException when running from a slave.

            People

            Assignee:
            sspringett Steve Springett
            Reporter:
            johnsonqu Johnson Qu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: