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

SSH Slaves plugin fails the host verification of slaves with an IllegalArgumentException

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Fixed
    • ssh-slaves-plugin
    • Java 64bit 1.8.0.131
      Jenkins 2.46.3
      ssh-slaves-plugin 1.18 (and 1.19)

    Description

      When we upgrade the ssh slaves plugin on the latest stable jenkins we get :

      ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
      java.lang.IllegalArgumentException
        at com.trilead.ssh2.Connection.setServerHostKeyAlgorithms(Connection.java:1311)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:796)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:792)
        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/13/17 13:10:39] Launch failed - cleaning up connection
      [06/13/17 13:10:39] [SSH] Connection closed.
      

       

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            Releasing as 1.20.

            jglick Jesse Glick added a comment - Releasing as 1.20.
            jglick Jesse Glick added a comment -

            Potentially the better fix would be to return super.getPreferredKeyAlgorithms(computer) in this case. At any rate, my patch ought to restore the 1.17 behavior in this situation, which I guess is good enough for now. mc1arke can look into refinements later.

            jglick Jesse Glick added a comment - Potentially the better fix would be to return super.getPreferredKeyAlgorithms(computer) in this case. At any rate, my patch ought to restore the 1.17 behavior in this situation, which I guess is good enough for now. mc1arke can look into refinements later.
            nfalco Nikolas Falco added a comment -

            I post also the config.xml of my 1.17 configuration (I'm back)

            nfalco Nikolas Falco added a comment - I post also the config.xml of my 1.17 configuration (I'm back)
            jglick Jesse Glick added a comment -

            Nothing new there—the only relevant aspect of the configuration in Jenkins is that you are using the known-hosts option. The question (if anyone cares) is why getPreferredServerHostkeyAlgorithmOrder failed. UnknownHostException trying to look up the slave? More likely, no known-hosts entry for that machine in recommendHostkeyAlgorithms, or multiple entries with different key types. Again I will leave it to mc1arke to evaluate what the desirable behavior is—I am just releasing a hotfix.

            At any rate, try updating to 1.20 when it becomes available on the update center, which should be soon.

            jglick Jesse Glick added a comment - Nothing new there—the only relevant aspect of the configuration in Jenkins is that you are using the known-hosts option. The question (if anyone cares) is why getPreferredServerHostkeyAlgorithmOrder failed. UnknownHostException trying to look up the slave? More likely, no known-hosts entry for that machine in recommendHostkeyAlgorithms , or multiple entries with different key types. Again I will leave it to mc1arke to evaluate what the desirable behavior is—I am just releasing a hotfix. At any rate, try updating to 1.20 when it becomes available on the update center, which should be soon.
            nfalco Nikolas Falco added a comment -

            I've download the hpi from the Jenkins JFrog repository

            It works, follow the log of one node:

            Warning: no key algorithms provided; JENKINS-42959 disabled
            [06/13/17 17:58:56] [SSH] Opening SSH connection to 10.0.7.188:22.
            [06/13/17 17:58:57] [SSH] SSH host key matches key in Known Hosts file. Connection will be allowed.
            [06/13/17 17:58:58] [SSH] Authentication successful.
            [06/13/17 17:58:58] [SSH] The remote users environment is:
            
            nfalco Nikolas Falco added a comment - I've download the hpi from the Jenkins JFrog repository It works, follow the log of one node: Warning: no key algorithms provided; JENKINS-42959 disabled [06/13/17 17:58:56] [SSH] Opening SSH connection to 10.0.7.188:22. [06/13/17 17:58:57] [SSH] SSH host key matches key in Known Hosts file. Connection will be allowed. [06/13/17 17:58:58] [SSH] Authentication successful. [06/13/17 17:58:58] [SSH] The remote users environment is:

            People

              jglick Jesse Glick
              admincrowdiugo IUGO Admin
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: