简体   繁体   English

詹金斯 - 问题:hudson.model.Queue$MaintainTask 失败

[英]Jenkins - Problem: hudson.model.Queue$MaintainTask failed

I have a problem : (pending—Waiting for next available executor)我有一个问题:(待定——等待下一个可用的执行程序)

Console log:控制台日志:

Timer task hudson.model.Queue$MaintainTask@fb3e676 failed
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class hudson.slaves.NodeProperty (java.lang.Integer is in module java.base of loader 'bootstrap'; hudson.slaves.NodeProperty is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @7364985f)
at hudson.model.Node.canTake(Node.java:409)
at hudson.model.Queue$JobOffer.getCauseOfBlockage(Queue.java:276)
at hudson.model.Queue.maintain(Queue.java:1633)
at hudson.model.Queue$MaintainTask.doRun(Queue.java:2904)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:91)
at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
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:834)

This looks to be related to a Jenkins bug: FATAL: java.lang.Integer cannot be cast to hudson.slaves.NodeProperty .这看起来与 Jenkins 错误有关: FATAL: java.lang.Integer cannot be cast to hudson.slaves.NodeProperty Did you recently upgrade your Jenkins?你最近升级了你的 Jenkins 吗?

  • Go to the root folder of your Jenkins installation.转到 Jenkins 安装的根文件夹。
  • Look in config.xml for <globalNodeProperties>config.xml查找<globalNodeProperties>
  • If it looks like this, it probably wasn't correctly upgraded:如果它看起来像这样,它可能没有正确升级:
<globalNodeProperties>
  <hudson.slaves.EnvironmentVariablesNodeProperty/>
  <int>2</int>
  <string></string>
  <string></string>
  ...
</globalNodeProperties>
  • The XML format changed, it should look like this (Note that int is no longer a globalNodeProperty , aka the exception your are getting: XML 格式已更改,它应该如下所示(请注意, int不再是globalNodeProperty ,也就是您获得的异常:
  <globalNodeProperties>
    <hudson.slaves.EnvironmentVariablesNodeProperty>
      <envVars serialization="custom">
        <unserializable-parents/>
        <tree-map>
          <default>
            <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../../../../views/listView/jobNames/comparator"/>
          </default>
          <int>2</int>
          <string></string>
          <string></string>
          ...
        </tree-map>
      </envVars>
    </hudson.slaves.EnvironmentVariablesNodeProperty>
  </globalNodeProperties>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM