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

ssh-credentials-plugin broken when using ssh-slaves-plugin 1.29.0



    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ssh-credentials-plugin
    • Labels:
    • Environment:
      Jenkins v2.138.2
      ssh-credentials-plugin version 1.14
      ssh-slaves-plugin version 1.29.0
    • Similar Issues:
    • Released As:


      Jenkins fails to launch agents when using the following combination of plugins:

      • ssh-credentials-plugin version 1.14
      • ssh-slaves-plugin version 1.29.0

      This results in the following error:

      SSHLauncher{host='jenkins-worker.example.com', port=22, credentialsId='bc123fc4-0123-4123-9123-81230e2d0e4d', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, maxNumRetries=80, retryWaitTime=15, sshHostKeyVerificationStrategy=None, tcpNoDelay=true, trackCredentials=true}
      [11/20/18 10:47:48] [SSH] Opening SSH connection to jenkins-worker.example.com:22.
      [11/20/18 10:47:49] [SSH] WARNING: SSH Host Keys are not being verified. Man-in-the-middle attacks may be possible against this connection.
      ERROR: Unexpected error in launching a agent. This is probably a bug in Jenkins.
      java.lang.NoClassDefFoundError: com/trilead/ssh2/Connection
        at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator$Factory.supports(TrileadSSHPasswordAuthenticator.java:194)
        at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator$Factory.newInstance(TrileadSSHPasswordAuthenticator.java:181)
        at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:216)
        at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:170)
        at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1213)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:846)
        at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:833)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
      [11/20/18 10:47:50] Launch failed - cleaning up connection
      [11/20/18 10:47:50] [SSH] Connection closed.


      This issue is caused by the ssh-slaves-plugin not longer using the trilead-ssh2 module from the Jenkins core. However, ssh-credentials-plugin still requires this. See: https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/TROUBLESHOOTING.md#1290-breaks-compatibility-with-cloud-plugins-that-do-not-use-trilead-api-plugin-as-dependency


      Current workaround is to downgrade the ssh-slaves-plugin to version 1.28.1.



          Issue Links


            tomdev Tom de Vries created issue -
            dnusbaum Devin Nusbaum made changes -
            Field Original Value New Value
            Assignee Devin Nusbaum [ dnusbaum ] Ivan Fernandez Calvo [ ifernandezcalvo ]
            dnusbaum Devin Nusbaum made changes -
            Link This issue is duplicated by JENKINS-54709 [ JENKINS-54709 ]
            dnusbaum Devin Nusbaum made changes -
            Link This issue relates to JENKINS-54686 [ JENKINS-54686 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            zanettea arrigo zanette made changes -
            Comment [ Result: JavaScript GUI Lib: ACE Editor bundle plugin,1.1
            Allure Jenkins Plugin,2.27.0
            Ant Plugin,1.9
            OWASP Markup Formatter Plugin,1.5
            Apache HttpComponents Client 4.x API Plugin,4.5.5-3.0
            Authentication Tokens API Plugin,1.3
            Autofavorite for Blue Ocean,1.2.2
            Bitbucket Pipeline for Blue Ocean,1.9.0
            Common API for Blue Ocean,1.9.0
            Config API for Blue Ocean,1.9.0
            Blue Ocean Core JS,1.9.0
            Dashboard for Blue Ocean,1.9.0
            Display URL for Blue Ocean,2.2.0
            Events API for Blue Ocean,1.9.0
            Git Pipeline for Blue Ocean,1.9.0
            GitHub Pipeline for Blue Ocean,1.9.0
            i18n for Blue Ocean,1.9.0
            JIRA Integration for Blue Ocean,1.9.0
            JWT for Blue Ocean,1.9.0
            Personalization for Blue Ocean,1.9.0
            Pipeline implementation for Blue Ocean,1.9.0
            Blue Ocean Pipeline Editor,1.9.0
            Pipeline SCM API for Blue Ocean,1.9.0
            REST Implementation for Blue Ocean,1.9.0
            REST API for Blue Ocean,1.9.0
            Web for Blue Ocean,1.9.0
            Blue Ocean,1.9.0
            bouncycastle API Plugin,2.17
            Branch API Plugin,2.1.1
            Build Timeout,1.19
            Bitbucket Branch Source Plugin,2.2.15
            Folders Plugin,6.7
            Command Agent Launcher Plugin,1.2
            Conditional BuildStep,1.3.6
            Convert To Pipeline,1.0
            Credentials Binding Plugin,1.17
            Credentials Plugin,2.1.18
            CVS Plug-in,2.14
            description setter plugin,1.10
            Display URL API,2.3.0
            Docker Commons Plugin,1.13
            Docker Pipeline,1.17
            Doxygen Plug-in,0.18
            Durable Task Plugin,1.28
            Email Extension Plugin,2.63
            Extended Choice Parameter Plug-In,0.76
            Extensible Choice Parameter plugin,1.6.0
            External Monitor Job Type Plugin,1.7
            Fail The Build Plugin,1.0
            Filesystem Trigger Plug-in,0.39
            Alternative build chooser,1.1
            Git client plugin,2.7.4
            Git Parameter Plug-In,0.9.6
            GIT server Plugin,1.7
            Git plugin,3.9.1
            GitHub API Plugin,1.92
            GitHub Branch Source Plugin,2.4.1
            GitHub plugin,1.29.3
            Hudson global-build-stats plugin,1.5
            JavaScript GUI Lib: Handlebars bundle plugin,1.1.1
            Handy Uri Templates 2.x API Plugin,2.1.6-1.0
            HTML Publisher plugin,1.17
            Jackson 2 API Plugin,
            Javadoc Plugin,1.4
            JDK Tool Plugin,1.1
            Design Language,1.9.0
            JIRA plugin,3.0.5
            Job Configuration History Plugin,2.18.3
            JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin,1.2.1
            jQuery plugin,1.12.4-0
            JSch dependency plugin,
            JUnit Plugin,1.26.1
            LDAP Plugin,1.20
            Locale plugin,1.4
            Lockable Resources plugin,2.3
            Mailer Plugin,1.22
            MapDB API Plugin,
            Matrix Authorization Strategy Plugin,2.3
            Matrix Project Plugin,1.13
            Maven Integration plugin,3.1.2
            Mercurial plugin,2.4
            JavaScript GUI Lib: Moment.js bundle plugin,1.1.1
            MSBuild Plugin,1.29
            Node and Label parameter plugin,1.7.2
            PAM Authentication plugin,1.4
            Parameterized Trigger plugin,2.35.2
            Pipeline: Build Step,2.7
            Pipeline: GitHub Groovy Libraries,1.0
            Pipeline Graph Analysis Plugin,1.9
            Pipeline: Input Step,2.8
            Pipeline: Milestone Step,1.3.1
            Pipeline: Model API,1.3.2
            Pipeline: Declarative Agent API,1.1.1
            Pipeline: Declarative,1.3.2
            Pipeline: Declarative Extension Points API,1.3.2
            Pipeline: REST API Plugin,2.10
            Pipeline: Stage Step,2.3
            Pipeline: Stage Tags Metadata,1.3.2
            Pipeline: Stage View Plugin,2.10
            Plain Credentials Plugin,1.4
            PostBuildScript Plugin,2.8.1
            Pub-Sub "light" Bus,1.12
            Run Condition Plugin,1.2
            SCM API Plugin,2.3.0
            Script Security Plugin,1.48
            Server Sent Events (SSE) Gateway Plugin,1.16
            SSH Credentials Plugin,1.14
            SSH Slaves plugin,1.29.1
            Startup Trigger,2.9.3
            Structs Plugin,1.17
            Subversion Plug-in,2.12.1
            TestComplete xUnit Plugin,1.1
            TestComplete 11 xUnit Plugin,1.1
            TestNG Results Plugin,1.15
            Throttle Concurrent Builds Plug-in,2.0.1
            Token Macro Plugin,2.5
            Trilead API Plugin,1.0.1
            Variant Plugin,1.1
            Windows Slaves Plugin,1.3.1
            Pipeline: API,2.33
            Pipeline: Basic Steps,2.12
            Pipeline: Shared Groovy Libraries,2.12
            Pipeline: Groovy,2.60
            Pipeline: Nodes and Processes,2.26
            Pipeline: Job,2.29
            Pipeline: Multibranch,2.20
            Pipeline: SCM Step,2.7
            Pipeline: Step API,2.16
            Pipeline: Supporting APIs,2.22
            xUnit plugin,2.3.1 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Released As ssh-slaves-1.29.1
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]


              ifernandezcalvo Ivan Fernandez Calvo
              tomdev Tom de Vries
              0 Vote for this issue
              5 Start watching this issue