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

SSH plugin fails intermittently because of issue with JSch

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This is similar to an earlier bug https://issues.jenkins-ci.org/browse/JENKINS-24402?jql=text%20~%20%22jsch%22

       

      Same problem has resurfaced in the later releases of JSch, because of that we get failed builds intermittently with the below error.

       

      JSch has included a fix for this problem in the latest version , v0.1.55.

      Upgrading Jenkins SSH plugin to this version should fix this problem.

       

      These discussion forums provide the context

      discussion about the issues in JSch and fix https://sourceforge.net/p/jsch/bugs/111/

      discussion about previous fix in Jenkins SSH plugin and further recurrences https://stackoverflow.com/questions/12279836/ssh-using-jschexception-verify-false-sometimes-fails

       

      Stacktrace:

      [SSH] executing...
      [SSH] Exception:Session.connect: java.security.SignatureException: Invalid encoding for signature
      com.jcraft.jsch.JSchException: Session.connect: java.security.SignatureException: Invalid encoding for signature
      at com.jcraft.jsch.Session.connect(Session.java:565)
      at org.jvnet.hudson.plugins.CredentialsSSHSite.createSession(CredentialsSSHSite.java:132)
      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)

       

        Attachments

          Activity

          Hide
          jvz Matt Sicker added a comment -

          But the jsch-plugin is already updated to JSCH 0.1.55. You made the release: https://github.com/jenkinsci/jsch-plugin/releases/tag/jsch-0.1.55

          Show
          jvz Matt Sicker added a comment - But the jsch-plugin is already updated to JSCH 0.1.55. You made the release: https://github.com/jenkinsci/jsch-plugin/releases/tag/jsch-0.1.55
          Hide
          jthompson Jeff Thompson added a comment -

          Matt Sicker, right. I released the jsch-plugin 0.1.55 containing the fix the for this. The ssh-plugin should be updated to reference the new jsch-plugin version. V Kusumanchi might be able to update the jsch-plugin version and test it out.

          Show
          jthompson Jeff Thompson added a comment - Matt Sicker , right. I released the jsch-plugin 0.1.55 containing the fix the for this. The ssh-plugin should be updated to reference the new jsch-plugin version. V Kusumanchi might be able to update the jsch-plugin version and test it out.
          Hide
          kusumanchi V Kusumanchi added a comment -

          Jeff Thompson, Matt Sicker I have updated the pom.xml with the reference to 0.1.55 version of jsch plugin.

          Raised a PR for the change, https://github.com/dev-medha-io/ssh-plugin/pull/1

          Could anyone merge this? Thanks

          Show
          kusumanchi V Kusumanchi added a comment - Jeff Thompson , Matt Sicker I have updated the pom.xml with the reference to 0.1.55 version of jsch plugin. Raised a PR for the change, https://github.com/dev-medha-io/ssh-plugin/pull/1 Could anyone merge this? Thanks
          Hide
          jthompson Jeff Thompson added a comment -

          V Kusumanchi, I think you want to change your pull request to merge into the master branch on jenkinsci/ssh-plugin. Otherwise, it looks good.

          Show
          jthompson Jeff Thompson added a comment - V Kusumanchi , I think you want to change your pull request to merge into the master branch on jenkinsci/ssh-plugin. Otherwise, it looks good.
          Hide
          kusumanchi V Kusumanchi added a comment -

          Thank you  Jeff Thompson, I created a new PR merging into jenkinsci/ssh-plugin.

          kindly have another look  https://github.com/jenkinsci/ssh-plugin/pull/18

          If you are happy, please merge it.

           

          Show
          kusumanchi V Kusumanchi added a comment - Thank you  Jeff Thompson , I created a new PR merging into jenkinsci/ssh-plugin. kindly have another look  https://github.com/jenkinsci/ssh-plugin/pull/18 If you are happy, please merge it.  

            People

            Assignee:
            kusumanchi V Kusumanchi
            Reporter:
            kusumanchi V Kusumanchi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: