-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Operating System: Ubuntu 22.04
openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode, sharing)
Jenkins running directly.
No reverse proxy.
Jenkins installed via DEB from https://pkg.jenkins.io/debian-stable
Agents are launched via an inbound connection on the fixed TCP port 50000
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Jenkins: 2.414.3
OS: Linux - 6.5.0-26-generic
Java: 11.0.22 - Ubuntu (OpenJDK 64-Bit Server VM)
---
ant:497.v94e7d9fffa_b_9
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
authentication-tokens:1.53.v1c90fd9191a_b_
basic-branch-build-strategies:81.v05e333931c7d
bootstrap5-api:5.3.2-3
bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9
branch-api:2.1128.v717130d4f816
build-timeout:1.32
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.0.2
cloudbees-folder:6.858.v898218f3609d
command-launcher:107.v773860566e2e
commons-lang3-api:3.13.0-62.v7d18e55f51e2
commons-text-api:1.11.0-95.v22a_d30ee5d36
configuration-as-code:1775.v810dc950b_514
configuration-as-code-groovy:1.1
credentials:1319.v7eb_51b_3a_c97b_
credentials-binding:657.v2b_19db_7d6e6d
display-url-api:2.200.vb_9327d658781
durable-task:550.v0930093c4b_a_6
echarts-api:5.4.0-7
email-ext:2.105
font-awesome-api:6.5.1-2
git:5.2.1
git-client:4.7.0
github:1.38.0
github-api:1.318-461.v7a_c09c9fa_d63
github-branch-source:1785.v99802b_69816c
github-checks:554.vb_ee03a_000f65
gradle:2.10
gson-api:2.10.1-15.v0d99f670e0a_7
instance-identity:185.v303dc7c645f9
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.17.0-379.v02de8ec9f64c
jakarta-activation-api:2.1.3-1
jakarta-mail-api:2.1.3-1
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.9-1
jdk-tool:73.vddf737284550
jjwt-api:0.11.5-77.v646c772fddb_0
joda-time-api:2.12.7-29.v5a_b_e3a_82269a_
jquery3-api:3.7.1-1
json-api:20240303-41.v94e11e6de726
json-path-api:2.9.0-33.v2527142f2e1d
junit:1265.v65b_14fa_f12f0
kubernetes:4054.v2da_8e2794884
kubernetes-client-api:6.10.0-240.v57880ce8b_0b_2
kubernetes-credentials:0.11
ldap:719.vcb_d039b_77d0d
libvirt-slave:286.vc21fa_98f531c
mailer:470.vc91f60c5d8e2
matrix-auth:3.2.2
matrix-project:822.824.v14451b_c0fd42
metrics:4.2.21-449.v6960d7c54c69
mina-sshd-api-common:2.12.0-99.vdb_f07841c2db_
mina-sshd-api-core:2.12.0-99.vdb_f07841c2db_
okhttp-api:4.11.0-172.vda_da_1feeb_c6e
pam-auth:1.10
pipeline-build-step:540.vb_e8849e1a_b_d8
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:216.vfd8b_ece330ca_
pipeline-groovy-lib:704.vc58b_8890a_384
pipeline-input-step:477.v339683a_8d55e
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2150.v4cfd8916915c
pipeline-model-definition:2.2150.v4cfd8916915c
pipeline-model-extensions:2.2150.v4cfd8916915c
pipeline-rest-api:2.34
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2150.v4cfd8916915c
pipeline-stage-view:2.34
plain-credentials:179.vc5cb_98f6db_38
plugin-util-api:3.8.0
prism-api:1.29.0-8
resource-disposer:0.23
role-strategy:689.v731678c3e0eb_
saml:4.464.vea_cb_75d7f5e0
scm-api:676.v886669a_199a_a_
script-security:1326.vdb_c154de8669
snakeyaml-api:2.2-111.vc6598e30cc65
ssh-credentials:334.v7732563deee1
ssh-slaves:2.948.vb_8050d697fec
sshd:3.322.v159e91f6a_550
structs:337.v1b_04ea_4df7c8
timestamper:1.26
token-macro:400.v35420b_922dcb_
trilead-api:2.142.v748523a_76693
variant:60.v7290fc0eb_b_cd
workflow-aggregator:596.v8c21c963d92d
workflow-api:1291.v51fd2a_625da_7
workflow-basic-steps:1049.v257a_e6b_30fb_d
workflow-cps:3889.v937e0b_3412d3
workflow-durable-task-step:1331.vc8c2fed35334
workflow-job:1385.vb_58b_86ea_fff1
workflow-multibranch:773.vc4fe1378f1d5
workflow-scm-step:427.v4ca_6512e7df1
workflow-step-api:657.v03b_e8115821b_
workflow-support:881.v7663695646cf
ws-cleanup:0.45Operating System: Ubuntu 22.04 openjdk version "11.0.22" 2024-01-16 OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1) OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode, sharing) Jenkins running directly. No reverse proxy. Jenkins installed via DEB from https://pkg.jenkins.io/debian-stable Agents are launched via an inbound connection on the fixed TCP port 50000 Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0 Jenkins: 2.414.3 OS: Linux - 6.5.0-26-generic Java: 11.0.22 - Ubuntu (OpenJDK 64-Bit Server VM) --- ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 authentication-tokens:1.53.v1c90fd9191a_b_ basic-branch-build-strategies:81.v05e333931c7d bootstrap5-api:5.3.2-3 bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9 branch-api:2.1128.v717130d4f816 build-timeout:1.32 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.0.2 cloudbees-folder:6.858.v898218f3609d command-launcher:107.v773860566e2e commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.11.0-95.v22a_d30ee5d36 configuration-as-code:1775.v810dc950b_514 configuration-as-code-groovy:1.1 credentials:1319.v7eb_51b_3a_c97b_ credentials-binding:657.v2b_19db_7d6e6d display-url-api:2.200.vb_9327d658781 durable-task:550.v0930093c4b_a_6 echarts-api:5.4.0-7 email-ext:2.105 font-awesome-api:6.5.1-2 git:5.2.1 git-client:4.7.0 github:1.38.0 github-api:1.318-461.v7a_c09c9fa_d63 github-branch-source:1785.v99802b_69816c github-checks:554.vb_ee03a_000f65 gradle:2.10 gson-api:2.10.1-15.v0d99f670e0a_7 instance-identity:185.v303dc7c645f9 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.17.0-379.v02de8ec9f64c jakarta-activation-api:2.1.3-1 jakarta-mail-api:2.1.3-1 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.9-1 jdk-tool:73.vddf737284550 jjwt-api:0.11.5-77.v646c772fddb_0 joda-time-api:2.12.7-29.v5a_b_e3a_82269a_ jquery3-api:3.7.1-1 json-api:20240303-41.v94e11e6de726 json-path-api:2.9.0-33.v2527142f2e1d junit:1265.v65b_14fa_f12f0 kubernetes:4054.v2da_8e2794884 kubernetes-client-api:6.10.0-240.v57880ce8b_0b_2 kubernetes-credentials:0.11 ldap:719.vcb_d039b_77d0d libvirt-slave:286.vc21fa_98f531c mailer:470.vc91f60c5d8e2 matrix-auth:3.2.2 matrix-project:822.824.v14451b_c0fd42 metrics:4.2.21-449.v6960d7c54c69 mina-sshd-api-common:2.12.0-99.vdb_f07841c2db_ mina-sshd-api-core:2.12.0-99.vdb_f07841c2db_ okhttp-api:4.11.0-172.vda_da_1feeb_c6e pam-auth:1.10 pipeline-build-step:540.vb_e8849e1a_b_d8 pipeline-github-lib:42.v0739460cda_c4 pipeline-graph-analysis:216.vfd8b_ece330ca_ pipeline-groovy-lib:704.vc58b_8890a_384 pipeline-input-step:477.v339683a_8d55e pipeline-milestone-step:111.v449306f708b_7 pipeline-model-api:2.2150.v4cfd8916915c pipeline-model-definition:2.2150.v4cfd8916915c pipeline-model-extensions:2.2150.v4cfd8916915c pipeline-rest-api:2.34 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2150.v4cfd8916915c pipeline-stage-view:2.34 plain-credentials:179.vc5cb_98f6db_38 plugin-util-api:3.8.0 prism-api:1.29.0-8 resource-disposer:0.23 role-strategy:689.v731678c3e0eb_ saml:4.464.vea_cb_75d7f5e0 scm-api:676.v886669a_199a_a_ script-security:1326.vdb_c154de8669 snakeyaml-api:2.2-111.vc6598e30cc65 ssh-credentials:334.v7732563deee1 ssh-slaves:2.948.vb_8050d697fec sshd:3.322.v159e91f6a_550 structs:337.v1b_04ea_4df7c8 timestamper:1.26 token-macro:400.v35420b_922dcb_ trilead-api:2.142.v748523a_76693 variant:60.v7290fc0eb_b_cd workflow-aggregator:596.v8c21c963d92d workflow-api:1291.v51fd2a_625da_7 workflow-basic-steps:1049.v257a_e6b_30fb_d workflow-cps:3889.v937e0b_3412d3 workflow-durable-task-step:1331.vc8c2fed35334 workflow-job:1385.vb_58b_86ea_fff1 workflow-multibranch:773.vc4fe1378f1d5 workflow-scm-step:427.v4ca_6512e7df1 workflow-step-api:657.v03b_e8115821b_ workflow-support:881.v7663695646cf ws-cleanup:0.45
As mentioned in JENKINS-72362, a missing 'nodeDescription' and 'nodeProperties' field causes the Jenkins server to fail to load libvirt agents via JCasC. The full stack trace is
java.lang.NullPointerException at java.base/java.util.ArrayList.<init>(ArrayList.java:179) at hudson.util.CopyOnWriteList.replaceBy(CopyOnWriteList.java:130) at hudson.util.PersistedList.replaceBy(PersistedList.java:95) at hudson.model.Slave.setNodeProperties(Slave.java:311) at hudson.plugins.libvirt.VirtualMachineSlave.<init>(VirtualMachineSlave.java:96) Caused: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:181) Caused: io.jenkins.plugins.casc.ConfiguratorException: virtualMachineSlave: Failed to construct instance of class hudson.plugins.libvirt.VirtualMachineSlave. Constructor: public hudson.plugins.libvirt.VirtualMachineSlave(java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.model.Node$Mode,java.lang.String,hudson.plugins.libvirt.VirtualMachineLauncher,hudson.slaves.ComputerLauncher,hudson.slaves.RetentionStrategy,java.util.List,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,boolean,int,java.lang.String) throws hudson.model.Descriptor$FormException,java.io.IOException. Arguments: [java.lang.String, null, java.lang.String, java.lang.String, hudson.model.Node$Mode, java.lang.String, hudson.plugins.libvirt.VirtualMachineLauncher, hudson.slaves.JNLPLauncher, hudson.slaves.RetentionStrategy$Always, null, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.Integer, java.lang.String]. Expected Parameters: name java.lang.String, nodeDescription java.lang.String, remoteFS java.lang.String, numExecutors java.lang.String, mode hudson.model.Node$Mode, labelString java.lang.String, launcher hudson.plugins.libvirt.VirtualMachineLauncher, delegateLauncher hudson.slaves.ComputerLauncher, retentionStrategy hudson.slaves.RetentionStrategy<? extends hudson.model.Computer>, nodeProperties java.util.List<? extends hudson.slaves.NodeProperty<?>>, hypervisorDescription java.lang.String, virtualMachineName java.lang.String, snapshotName java.lang.String, startupWaitingPeriodSeconds int, shutdownMethod java.lang.String, rebootAfterRun boolean, startupTimesToRetryOnFailure int, beforeJobSnapshotName java.lang.String at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.tryConstructor(DataBoundConfigurator.java:203) at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.instance(DataBoundConfigurator.java:75) at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:274) at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.configure(DataBoundConfigurator.java:81) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$doConfigure$16668e2$1(HeteroDescribableConfigurator.java:311) at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.doConfigure(HeteroDescribableConfigurator.java:311) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$2(HeteroDescribableConfigurator.java:88) at io.vavr.control.Option.map(Option.java:392) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:88) at io.vavr.Tuple2.apply(Tuple2.java:238) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:86) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:94) at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:57) at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:355) at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293) at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$9(ConfigurationAsCode.java:830) at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:773) at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:830) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:816) at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:695) at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:352) at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:341) Caused: io.jenkins.plugins.casc.ConfigurationAsCodeBootFailure at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:343) Caused: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109) Caused: java.lang.Error at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:115) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:185) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1166) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:221) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68) 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:829) Caused: org.jvnet.hudson.reactor.ReactorException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:290) at jenkins.InitReactorRunner.run(InitReactorRunner.java:49) at jenkins.model.Jenkins.executeReactor(Jenkins.java:1201) at jenkins.model.Jenkins.<init>(Jenkins.java:989) at hudson.model.Hudson.<init>(Hudson.java:86) at hudson.model.Hudson.<init>(Hudson.java:82) at hudson.WebAppMain$3.run(WebAppMain.java:247) Caused: hudson.util.HudsonFailedToLoad at hudson.WebAppMain$3.run(WebAppMain.java:264)
An example of broken agent JCasC:
- virtualMachineSlave: beforeJobSnapshotName: "BuildImage" delegateLauncher: inbound: workDirSettings: disabled: false failIfWorkDirIsMissing: false internalDir: "remoting" hypervisorDescription: "QEMU+ssh - REDACTED" labelString: "Fedora-prev Fedora-38" launcher: delegate: inbound: workDirSettings: disabled: false failIfWorkDirIsMissing: false internalDir: "remoting" hypervisorDescription: "QEMU+ssh - REDACTED" timesToRetryOnFailure: 0 virtualMachineName: "Fedora-38" waitingTimeSecs: 60 mode: EXCLUSIVE name: "Fedora-38" numExecutors: 1 rebootAfterRun: true remoteFS: "/home/REDACTED" retentionStrategy: "always" shutdownMethod: "shutdown" snapshotName: "BuildImage" startupTimesToRetryOnFailure: 0 startupWaitingPeriodSeconds: 60 virtualMachineName: "Fedora-38"
An example of working JCasC:
- virtualMachineSlave: beforeJobSnapshotName: "BuildImage" delegateLauncher: inbound: workDirSettings: disabled: false failIfWorkDirIsMissing: false internalDir: "remoting" hypervisorDescription: "QEMU+ssh - REDACTED" labelString: "Fedora-prev Fedora-38" launcher: delegate: inbound: workDirSettings: disabled: false failIfWorkDirIsMissing: false internalDir: "remoting" hypervisorDescription: "QEMU+ssh - REDACTED" timesToRetryOnFailure: 0 virtualMachineName: "Fedora-38" waitingTimeSecs: 60 mode: EXCLUSIVE name: "Fedora-38" nodeDescription: "Fedora 38" nodeProperties: [] numExecutors: 1 rebootAfterRun: true remoteFS: "/home/REDACTED" retentionStrategy: "always" shutdownMethod: "shutdown" snapshotName: "BuildImage" startupTimesToRetryOnFailure: 0 startupWaitingPeriodSeconds: 60 virtualMachineName: "Fedora-38"
In order to workaround the issue:
- Set the "Description" field of the agent to a non-empty value.
- Check a box under "Node Properties"? I just manually added 'nodeProperties: []' to the YAML file (note that Jenkins does *not* generate this for you when exporting configuration as JCasC).