The Build Executor Status panel shows an error

Issue

Under certain circumstances, the Build executor panel shows the following error

and the Jenkins logs show this stackstrace

2020-12-05 08:48:28.081+0000 [id=160266]    WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID efwae028-d134-475b-82dd-92358292cae0
org.apache.commons.jelly.JellyTagException: jar:file:/app/jenkins/war/WEB-INF/lib/jenkins-core-2.249.2-cb-1.jar!/hudson/model/View/sidepanel.jelly:75:50: <st:include> org.apache.commons.jelly.JellyTagException: jar:file:/app/jenkins/war/WEB-INF/lib/jenkins-core-2.249.2-cb-1.jar!/lib/hudson/executors.jelly:75:28: <j:otherwise> Please log in to access user1
    at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:281)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
    at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:99)
...
Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/app/jenkins/war/WEB-INF/lib/jenkins-core-2.249.2-cb-1.jar!/lib/hudson/executors.jelly:75:28: <j:otherwise> Please log in to access user1
	at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:281)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
...
Caused by: org.acegisecurity.AccessDeniedException: Please log in to access user1
	at com.cloudbees.hudson.plugins.folder.AbstractFolder.getItem(AbstractFolder.java:1048)
	at com.cloudbees.hudson.plugins.folder.AbstractFolder.getItem(AbstractFolder.java:144)
	at jenkins.model.Jenkins.getItemByFullName(Jenkins.java:2964)
	at org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask.getOwnerTask(ExecutorStepExecution.java:434)
	at hudson.model.Executor.hasStopPermission(Executor.java:894)
	at sun.reflect.GeneratedMethodAccessor320.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)

Environment

Issues Related

  • JENKINS-63868 PlaceholderTask.getOwnerTask vulnerable to AccessDeniedException
  • JENKINS-63486 Build Executor Status throws error and main view is empty if user has no read permissions to a pipeline job

Explanation

The problem was introduced in Pipeline: Nodes and Processes in version 2.36 as part of this Pull Request.

Jenkins.getItemByFullName requires read/discover permissions, so if the user logged in Jenkins doesn’t have them for any of the jobs running in the Build Executor Status, the UI gets broken.

Resolution

The problem is fixed in Pipeline: Nodes and Processes in version 2.37, thus to get the solution you need to upgrade the product to CloudBees CI 2.249.3.3 revision 2 or higher. This version includes an upgrade for Pipeline: Nodes and Processes in version 2.37

Have more questions?

0 Comments

Please sign in to leave a comment.