Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44830

NullPointerException when upgrading to ssh-slaves 1.18

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • ssh-slaves-plugin
    • Jenkins 2.46.3, ssh-slaves 1.18

      Reproduction steps.

      1. Start Jenkins without installing any plugins
      2. Install an older ssh-slaves plugin (e.g. 1.14), this way there is no key verification strategy configuration. You'll need to also install ssh-credentials manually.
      3. Add an SSH-based agent.
      4. Upgrade to ssh-slaves 1.18 and restart the Jenkins instance.
      5. Note the following error in the agent log:
      ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
      java.lang.NullPointerException
      	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:789)
      	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:785)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      [06/12/17 19:19:28] Launch failed - cleaning up connection
      [06/12/17 19:19:28] [SSH] Connection closed.
      

      To make sure this was specific to 1.18, I tested the upgrade from 1.14 to 1.17 and did not see a NullPointerException.

          [JENKINS-44830] NullPointerException when upgrading to ssh-slaves 1.18

          R. Tyler Croy added a comment -

          I believe this is related to JENKINS-42959. The reason this is a particular gnarly bug to me, is that while an admin should have set a host key verification strategy, if they didn't, then 1.18 will break all connected agents.

          R. Tyler Croy added a comment - I believe this is related to JENKINS-42959 . The reason this is a particular gnarly bug to me, is that while an admin should have set a host key verification strategy, if they didn't , then 1.18 will break all connected agents.

          Daniel Beck added a comment -

          mc1arke Could you PTAL?

          Daniel Beck added a comment - mc1arke Could you PTAL?

          Daniel Beck added a comment -

          Daniel Beck added a comment - CC jglick oleg_nenashev  

          Oleg Nenashev added a comment -

          Smells like a blocker to me

          Oleg Nenashev added a comment - Smells like a blocker to me

          Jesse Glick added a comment -

          I will take a stab at this.

          Jesse Glick added a comment - I will take a stab at this.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          pom.xml
          src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
          src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java
          http://jenkins-ci.org/commit/ssh-slaves-plugin/7487db55f6b6b5adadbbc6884fad56113772d540
          Log:
          [FIXED JENKINS-44830] Correct NPE after upgrading caused by fix of JENKINS-42959.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/hudson/plugins/sshslaves/SSHLauncher.java src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java http://jenkins-ci.org/commit/ssh-slaves-plugin/7487db55f6b6b5adadbbc6884fad56113772d540 Log: [FIXED JENKINS-44830] Correct NPE after upgrading caused by fix of JENKINS-42959 .

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
          src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java
          http://jenkins-ci.org/commit/ssh-slaves-plugin/367bfdfa1d297f88a840e429b20acba0a34e0032
          Log:
          Merge pull request #61 from jglick/NPE-JENKINS-44830

          JENKINS-44830 NPE after upgrading caused by fix of JENKINS-42959

          Compare: https://github.com/jenkinsci/ssh-slaves-plugin/compare/ce18ed6aa6b4...367bfdfa1d29

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/hudson/plugins/sshslaves/SSHLauncher.java src/test/java/hudson/plugins/sshslaves/SSHLauncherTest.java http://jenkins-ci.org/commit/ssh-slaves-plugin/367bfdfa1d297f88a840e429b20acba0a34e0032 Log: Merge pull request #61 from jglick/NPE- JENKINS-44830 JENKINS-44830 NPE after upgrading caused by fix of JENKINS-42959 Compare: https://github.com/jenkinsci/ssh-slaves-plugin/compare/ce18ed6aa6b4...367bfdfa1d29

          Jesse Glick added a comment -

          Released as 1.19.

          Jesse Glick added a comment - Released as 1.19.

            jglick Jesse Glick
            rtyler R. Tyler Croy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: