2

We have multiple Jenkins controllers for different products. One 2 of those controllers, a new behaviour has emerged. When I create a new node through the GUI (using the "Permanent Node" option, not copying an existing node), I can get the new node to work. It connects properly, everything looks good in the GUI.

But, when I go to edit the config, I get an error like:

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

Here is the detail from the Jenkins log:

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 {"name":"renbe-dev-tuttlj-leap15a","nodeDescription":"Hi","":["Hi","hudson.plugins.sshslaves.SSHLauncher","0"],"numExecutors":"1","remoteFS":"/home/jenkins/a","labelString":"","mode":"EXCLUSIVE","launcher":{"oldCommand":"","stapler-class":"hudson.plugins.sshslaves.SSHLauncher","$class":"hudson.plugins.sshslaves.SSHLauncher","host":"tuttlj-leap15.domain.com","includeUser":"false","credentialsId":"jenkins-node-ssh","":"2","sshHostKeyVerificationStrategy":{"requireInitialManualTrust":false,"stapler-class":"hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy","$class":"hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy"},"port":"22","javaPath":"","jvmOptions":"","prefixStartSlaveCmd":"","suffixStartSlaveCmd":"","launchTimeoutSeconds":"60","maxNumRetries":"10","retryWaitTime":"15","tcpNoDelay":true,"workDir":""},"retentionStrategy":{"stapler-class":"hudson.slaves.RetentionStrategy$Always","$class":"hudson.slaves.RetentionStrategy$Always"},"nodeProperties":{"stapler-class-bag":"true","hudson-plugins-jobConfigHistory-NodeLocalConfiguration":{"changeReasonComment":""}},"Submit":"","core:apply":"","Jenkins-Crumb":"ed71f273b79d021e6edc77f7e46e1c5b0b89e0bbdf844fb2e62975c9e21a7aba"}

I eventually looked at the node's config file in ~jenkins/nodes:

<?xml version='1.1' encoding='UTF-8'?>
<slave>
  <name>renbe-dev-tuttlj-leap15a</name>
  <description></description>
  <remoteFS>/home/jenkins/a</remoteFS>
  <numExecutors>1</numExecutors>
  <mode>EXCLUSIVE</mode>
  <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
  <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="[email protected]_c555">
    <host>tuttlj-leap15.domain.com</host>
    <port>22</port>
    <credentialsId>jenkins-node-ssh</credentialsId>
    <launchTimeoutSeconds>60</launchTimeoutSeconds>
    <maxNumRetries>10</maxNumRetries>
    <retryWaitTime>15</retryWaitTime>
    <sshHostKeyVerificationStrategy class="hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy">
      <requireInitialManualTrust>false</requireInitialManualTrust>
    </sshHostKeyVerificationStrategy>
    <tcpNoDelay>true</tcpNoDelay>
  </launcher>
  <label></label>
  <nodeProperties>
    <null/>
  </nodeProperties>

If I create a new node through the filesystem with a similar XML but changing the tag to simply:

<nodeProperties/>

then the node works.

Something is causing that "null" value in the nodeProperties which is OK on node creation but is not OK when editing the config later.

This is happening on 2 Jenkins controllers with similar but not identical plugins, but is not happening on a 3rd controller which has vastly different plugins. All 3 are running Jenkins v2.492.3 so I don't believe it's a Jenkins controller issue, I think it has to be a plugin issue, but I don't know which one would cause the illegal null in the XML.

The answer https://stackoverflow.com/a/76389838/13563 to a similar error report tells me that others have run into this, but it doesn't provide a solution.

4
  • 1
    Using a brutal upgrade/downgrade plugin and create/edit node process, I think I narrowed it down to upgradeing plugins.jenkins.io/jobConfigHistory from 1305.vf20a_356586b_8 to 1352.va_201a_8389340. Downgrading allows node-creation to work without that null value in <nodeProperties>. I will submit a bug and update here later... Commented Aug 21 at 19:05
  • 1
    Filed issues.jenkins.io/browse/JENKINS-76018 Commented Aug 21 at 19:16
  • You posted an official Jenkins bug report on this, which was confirmed by others (including myself). You mentioned one workaround (plugin downgrade) here, and someone else mentioned another workaround (Disable show change message dialog) in the bug report comments. I think, you might as well answer your own question at this point. I'd be happy to upvote it, for sure. Commented Sep 3 at 9:35
  • I will give the plugin devs a little more time to fix or cancel the official bug, but yes, for others coming here until then, there are workarounds including downgrading the plugin, upgrading Jenkins, and system config options to disable the dialog. Commented Sep 3 at 12:58

1 Answer 1

1

This should be fixed with Version 1356.ve360da_6c523a_

Sign up to request clarification or add additional context in comments.

1 Comment

Verified that plugin v1356.ve360da_6c523a_ works correctly on Jenkins 2.492.3. Tested with the System Config setting (to show the Change dialog) enabled and disabled. I can add new nodes and change them without errors now, thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.