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

htmlpublisher-plugin occasionally fails with "script returned exit code 1"

      Over in Apache Foundation, Apache HBase makes use of Jenkins as a foundation-provided resource. We define a job that is driven by a Jenkinsfile. That jobs is comprised of multiple parallel stages. Many of the stages are nearly identical, and most of them conclude with a stanza that looks like

      post {
        always {
          ...
          publishHTML target: [
            allowMissing         : true,
            keepAll              : true,
            alwaysLinkToLastBuild: true,
            // Has to be relative to WORKSPACE.
            reportDir            : "${env.OUTPUT_DIR_RELATIVE}",
            reportFiles          : 'console-report.html',
            reportName           : 'JDK11 Nightly Build Report (Hadoop3)'
          ]
        }
      }
      

      Occasionally, stages in our BlueOcean builds will be marked as failed on this "Publish HTML reports" action. Output looks like this

      [2020-05-02T11:13:44.352Z] [htmlpublisher] Archiving HTML reports...
      [2020-05-02T11:13:44.370Z] [htmlpublisher] Archiving at BUILD level /home/jenkins/jenkins-slave/workspace/HBase_Nightly_branch-2.3@2/output-jdk11-hadoop3 to /x1/jenkins/jenkins-home/jobs/HBase Nightly/branches/branch-2-3.v4n2jn/builds/62/htmlreports/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29
      script returned exit code 1
      

      I've been working with the fine folks in ASF Infra to track down the issues, on my quest for passing builds. Unfortunately, we're stumped. Any advice or suggestions are most welcome!

      Thanks in advance.

          [JENKINS-62161] htmlpublisher-plugin occasionally fails with "script returned exit code 1"

          ndimiduk I don't believe this is an issue with HTML Publisher - the only reason that I think you are seeing the Exit message after the publishHTML step is because publishHTML is set as a post action which always happens even with a failure.

          I'd suspect that the issue is actually coming from https://github.com/apache/hbase/blob/master/dev-support/Jenkinsfile#L233 (and so tracking down why its hitting that state might be what's needed). 

          Richard Bywater added a comment - ndimiduk I don't believe this is an issue with HTML Publisher - the only reason that I think you are seeing the Exit message after the publishHTML step is because publishHTML is set as a post action which always happens even with a failure. I'd suspect that the issue is actually coming from  https://github.com/apache/hbase/blob/master/dev-support/Jenkinsfile#L233  (and so tracking down why its hitting that state might be what's needed). 

          Nick Dimiduk added a comment -

          We see this failure in the html publisher even when the underly job would have otherwise succeeded. Indeed, this is the reason I started to pursue this problem in the first place. Curious, though, that you suspect this action is reporting the failure status of a different action in the pipeline. Seems like that should be a separate bug.

          Thanks for the quick response r2b2_nz!

          Nick Dimiduk added a comment - We see this failure in the html publisher even when the underly job would have otherwise succeeded. Indeed, this is the reason I started to pursue this problem in the first place. Curious, though, that you suspect this action is reporting the failure status of a different action in the pipeline. Seems like that should be a separate bug. Thanks for the quick response r2b2_nz !

            r2b2_nz Richard Bywater
            ndimiduk Nick Dimiduk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: