Search code examples
jenkinsjenkins-pipelinejenkins-plugins

upgrading Jenkins from version 2.375.4 to 2.387.3 failed the pipeline (hudson.util.Secret)


  • I upgrade my Jenkins container from 2.375.4 to 2.387.3

  • I also tried installing a fresh Jenkins container of 2.387.3

  • I also tried installing a fresh Jenkins container of image: jenkins/jenkins:lts

  • I also tried installing a fresh Jenkins container of image: jenkins/jenkins:lts-jdk11

  • The pipeline now failed with the following error again and again and cannot proceed

Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 9675d3f6-cd62-4305-b10a-12e8c5248c96
java.lang.ClassCastException: class java.lang.String cannot be cast to class hudson.util.Secret (java.lang.String is in module java.base of loader 'bootstrap'; hudson.util.Secret is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @4d5650ae)
    at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.convertExtraVars(AnsiblePlaybookStep.java:390)
    at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:422)
    at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:352)
    at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
    at hudson.security.ACL.impersonate2(ACL.java:451)
    at hudson.security.ACL.impersonate(ACL.java:463)
    at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Finished: FAILURE

This failure happens in a stage of coping files from tfs build server to the machines that belong to the tested lab.

The stage execute an Ansible PowerShell script that pulls the relevant file by parameters that passed to it from parameters section in the Jenkins file.

  • Is it a bug?
  • Can I workaround through this issue?

Additional Information:

  • I use to install Jenkins via docker-compose
  • I use to install the suggested plugins at the first launch of the site
  • I use to install additional 2 plugins: Ansible and Blue Ocean

Solution

  • Does this happen while trying to invoke an ansible playbook?

    Had this happen to us after updating to the latest ansible plugin for jenkins, a downgrade of just the plugin fixed it.

    Related ticket - https://issues.jenkins.io/projects/JENKINS/issues/JENKINS-71286?filter=allopenissues