You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过Jenkins GUI创建的节点编辑配置时报错,config.xml中<nodeProperties>值异常

通过Jenkins GUI创建的节点编辑配置时报错,config.xml中值异常

我最近碰到了和你完全一样的问题,节点刚创建完能正常连接跑任务,结果一点编辑配置就报错,折腾了好一阵才找到问题根源,分享给你:

问题现象

  • 用Jenkins GUI新建永久节点(不是复制现有节点),节点能正常连接、状态显示一切正常
  • 但点击「配置」按钮编辑节点时,页面直接抛出错误:

    A problem occurred while processing the request, Logging ID=f10cac89-d3a5-47fd-9598-cf08f6b39ba0

查看Jenkins日志得到的错误栈

Caught unhandled exception with ID f10cac89-d3a5-47fd-9598-cf08f6b39ba0
java.lang.NullPointerException: Cannot invoke "hudson.model.Describable.getDescriptor()" because "t" is null
at hudson.util.DescribableList.get(DescribableList.java:134)
at hudson.util.DescribableList.rebuild(DescribableList.java:175)
at hudson.model.Node$1.onConvert(Node.java:590)
at hudson.model.Descriptor$NewInstanceBindInterceptor.onConvert(Descriptor.java:740)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:777)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:620)
at org.kohsuke.stapler.RequestImpl.injectSetters(RequestImpl.java:1046)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:990)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:861)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:620)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:615)
at hudson.model.Descriptor.bindJSON(Descriptor.java:662)
at hudson.model.Descriptor.newInstanceImpl(Descriptor.java:620)
Caused: java.lang.LinkageError: Failed to instantiate class hudson.slaves.DumbSlave from {...}

排查发现的核心问题

我去Jenkins主目录下的~jenkins/nodes/[你的节点名]/config.xml里一看,发现<nodeProperties>标签的内容明显不对:

<nodeProperties>
  <null/>
</nodeProperties>

正常情况下,没有自定义节点属性的节点,这里应该是空标签:<nodeProperties/>

解决步骤

  1. 先确保这个节点没有在运行任务,或者临时停掉Jenkins服务(避免修改配置时冲突)
  2. 找到对应节点的config.xml文件,修改<nodeProperties>部分:
    把带<null/>的代码块改成空标签:
    <nodeProperties/>
    
  3. 保存文件后,重启Jenkins(或者在Jenkins后台刷新节点配置)
  4. 再去编辑节点配置,就不会再报错了

推测的原因

这个问题应该是插件兼容性导致的——从错误日志里的hudson-plugins-jobConfigHistory-NodeLocalConfiguration来看,大概率是Job Config History插件和SSH Slaves插件的组合,在节点创建时把空的nodeProperties错误序列化成了<null/>,而Jenkins在解析这个无效配置时触发了空指针异常。

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.07 09:28:10