詹金斯:“这是我的工作。”;无法初始化类org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist“;

詹金斯:“这是我的工作。”;无法初始化类org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist“;,jenkins,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

(至少)我的一份詹金斯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版,现在工作正常了

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

V2.212有回归,并导致所述错误:
新版本将很快发布,以解决此问题。

更新

升级到可修复此问题

修复插件类资源加载失败,包括 图书馆的罐子。至少包括脚本安全性和active directory 插件已知会受到影响。(第2.112节中的回归)(第60641期, 第60644期)


原始答案:

这是脚本安全插件1.68和Jenkins 2.212的一个已知问题

建议降级至

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


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

使用Jenkins 2.212将脚本安全性降级到1.67仍然不起作用。刚刚测试-相同的错误。您重新启动了实例吗?是的,多次。当我第一次注意到这个问题时,我确实更新了所有的lib,然后重新启动,但没有修复。然后我读了这篇文章,尝试降级脚本安全性,重新启动,没有修复。尝试升级到新的Jenkins版本2.213-这应该会有帮助。升级到Bugfix版本2.213为我解决了这个问题。现在再次运行,检查了1.68 PluginI,但未找到2.211。有什么想法吗?我应该把它升级到新版本2.213,它也解决了这个问题。升级到2.213到今天早上在这里也起了作用