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

Build step 'Execute shell script on remote host using ssh' failing with NPE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • ssh-plugin
    • Jenkins 2.121.2

      I am running a script on remote hosts , it used to work very well, however after upgrading to 2.121.1 i see failures.

       [SSH] script:
      df -h | head -3 | grep -E '90%|91%|92%|93%|94%|95%|96%|97%|98%|99%|100%'
      if [ $? == 0 ]
      then
       echo "TestDrive Server: Not Enough free disk space, please remove some files"
       exit 1
      else 
       echo "TestDrive Server: Disk Space is free, chill !!!!"
       exit 0
      fi
      [SSH] executing...
      ERROR: Build step failed with exception
      java.lang.NullPointerException
       at com.cloudbees.plugins.credentials.matchers.IdMatcher.<init>(IdMatcher.java:56)
       at com.cloudbees.plugins.credentials.CredentialsMatchers.withId(CredentialsMatchers.java:132)
       at org.jvnet.hudson.plugins.CredentialsSSHSite.lookupCredentialsById(CredentialsSSHSite.java:313)
       at org.jvnet.hudson.plugins.CredentialsSSHSite.createSession(CredentialsSSHSite.java:111)
       at org.jvnet.hudson.plugins.CredentialsSSHSite.executeCommand(CredentialsSSHSite.java:208)
       at org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:104)
       at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
       at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
       at hudson.model.Build$BuildExecution.build(Build.java:206)
       at hudson.model.Build$BuildExecution.doRun(Build.java:163)
       at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
       at hudson.model.Run.execute(Run.java:1798)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:429)
      Build step 'Execute shell script on remote host using ssh' marked build as failure
      Sending e-mails to: kakadia@avaya.com nandaa@avaya.com
      Finished: FAILURE

       

       

            Unassigned Unassigned
            ravikakadia Ravi Kakadia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: