詹金斯:“无法初始化org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist类”


12

(租约)我的Jenkins CI职位之一突然停止工作。似乎Jenkins运行时找不到其预期的类之一。以前有没有人看到此错误,并且知道可能是什么原因导致的?我在Debian上运行2.212版本。脚本安全插件正在运行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

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

Answers:


7

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


1
使用Jenkins 2.212将脚本安全性降级到1.67仍然无法正常工作。刚刚测试-同样的错误。
科斯塔斯

我也是。还有其他解决方法吗?
mtutty

您是否重新启动了实例?
dschuldt

是的,几次。当我第一次注意到该问题时,我确实更新了所有库,然后重新启动但没有修复。然后,我阅读了这篇文章,并尝试将脚本安全性降级,再次重新启动并且没有修复。
mtutty

尝试升级到新的Jenkins 2.213版本-这应该有所帮助。
Michael Kemmerzell

8

更新

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

修复包含库JAR的插件的插件类资源加载失败。至少已知脚本安全性和活动目录插件会受到影响。(2.112中的回归)(问题60641,问题60644)

原始答案:

这是脚本安全插件1.68和Jenkins 2.212的一个已知问题(JENKINS-60644JENKINS-60641)。

建议降级到Jenkins 2.211

警告:此版本[2.212]引入了关键回归,请参阅JENKINS-60644。请避免更新到此版本。


我检查了updates.jenkins-ci.org,但未找到2.211。有什么想法我应该看的吗?
mtutty

而是将其升级到新版本2.213,该版本也解决了该问题。
Michael Kemmerzell

1
升级到2.213到今天早上也在这里工作
krad

3

V2.212进行了回归,并导致了所描述的错误:https ://issues.jenkins-ci.org/browse/JENKINS-60644 新版本将很快发布,以解决该问题。


0

我刚刚更新到V2.213,此问题已为我解决。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.