Jenkins: "Could not initialize class org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist"

huangapple go评论62阅读模式
英文:

Jenkins: "Could not initialize class org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist"

问题

(至少) 我的Jenkins CI作业突然停止工作。似乎Jenkins运行时找不到其中一个预期的类。有人见过这个错误吗,知道可能是什么原因吗?我在Debian上运行版本2.212。脚本安全插件运行版本1.68。

更新:我将脚本安全插件降级到版本1.67,现在工作正常。

英文:

(At lease) one of my Jenkins CI-jobs suddenly stopped working. Seems like the Jenkins runtime can't find one of its expected classes. Have anyone seen this error before, and know what may be causing it? I'm running version 2.212 on Debian. The Script Security Plugin is running version 1.68.

Started by user John Doe
Obtained Jenkinsfile from git ssh://git@git.acme.com:7999/my/repo.git
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] End of Pipeline
java.lang.NoClassDefFoundError: Could not initialize class org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:183)
	at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:189)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:193)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:100)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
	at WorkflowScript.run(WorkflowScript)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:405)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:317)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:281)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
	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

UPDATE: I downgraded Script Security Plugin to version 1.67, and now the job works.

答案1

得分: 8

升级到 Jenkins 版本 2.213 可以解决此问题。

修复了插件类资源加载失败的问题,对于包含库 JAR 的插件已知会受到影响。至少 script-security 和 active-directory 插件已知受到影响。 (2.112 中的回归) (问题 60641,问题 60644)

原始回答:

这是 Script Security 插件 1.68 和 Jenkins 2.212 中已知的问题 (JENKINS-60644JENKINS-60641)。

建议降级到 Jenkins 2.211

警告:此版本 [2.212] 引入了一个严重的回归,请避免升级到此版本。

英文:

Update:

An upgrade to Jenkins Version 2.213 fixes the issue.

> Fix plugin class resource loading failures for plugins which include
> library JARs. At least the script-security and active-directory
> plugins are known to be affected. (regression in 2.112) (issue 60641,
> issue 60644)


Original answer:

It is a known issue (JENKINS-60644 and JENKINS-60641) with Script Security Plugin 1.68 and Jenkins 2.212.

It is adviced to downgrade to Jenkins 2.211.

> WARNING: This release [2.212] introduces a critical regression, see
> JENKINS-60644. Please avoid updating to this version.

答案2

得分: 7

我有很多类似的错误消息,自从更新到2.212和脚本安全插件1.68以来。将后者降级到1.67目前解决了我的问题。

英文:

I do have a lot of similar error messages since the update to 2.212 and script security plugin 1.68. Downgrading the latter to 1.67 solved my issues for now.

答案3

得分: 3

V2.212存在回归问题,导致描述的错误:https://issues.jenkins-ci.org/browse/JENKINS-60644
新版本将很快发布,修复此问题。

英文:

V2.212 has regression and causing the described bug: https://issues.jenkins-ci.org/browse/JENKINS-60644
New version will be published soon fixing the issue.

答案4

得分: 0

我刚刚更新到 V2.213,问题已经解决了。

英文:

I just updated to V2.213 and the issue was resolved for me.

huangapple
  • 本文由 发表于 2020年1月6日 17:38:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609716.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定