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

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

    XMLWordPrintable

    Details

    • 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:
      ssh-slaves-1.29.1

      Description

      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.

      Cause

      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

      Workaround

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

       

        Attachments

          Issue Links

            Activity

            tomdev Tom de Vries created issue -
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Based on this post by Ivan Fernandez Calvo, I think this should be fixed in the 1.29.1 release of ssh-slaves.

            Show
            dnusbaum Devin Nusbaum added a comment - Based on this post by Ivan Fernandez Calvo , I think this should be fixed in the 1.29.1 release of ssh-slaves.
            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 ]
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            yep, it is caused by JENKINS-54686, I have fixed it this morning on ssh-slaves 1.29.1

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited yep, it is caused by JENKINS-54686 , I have fixed it this morning on ssh-slaves 1.29.1
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Hide
            zanettea arrigo zanette added a comment -

            I still see the issue with 1.29.1

            Show
            zanettea arrigo zanette added a comment - I still see the issue with 1.29.1
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            Could you please execute the following script in your Jenkins console and attach the result? it will generate the list of installed plugins, this will allow me to try to replicate the issue.

            result = ''
            for (plugin in Jenkins.instance.pluginManager.plugins) {
            	result = result + "${plugin.displayName}" + ',' + "${plugin.version}\n"
            }
            return result
            
            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - Could you please execute the following script in your Jenkins console and attach the result? it will generate the list of installed plugins, this will allow me to try to replicate the issue. result = '' for (plugin in Jenkins.instance.pluginManager.plugins) { result = result + "${plugin.displayName}" + ',' + "${plugin.version}\n" } return result
            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-name-setter,1.6.9
            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
            Favorite,2.3.2
            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,2.9.7.1
            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,0.1.54.2
            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,1.0.9.0
            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
            Monitoring,1.74.0
            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
            ThinBackup,1.9
            Throttle Concurrent Builds Plug-in,2.0.1
            Timestamper,1.8.10
            Token Macro Plugin,2.5
            Trilead API Plugin,1.0.1
            Variant Plugin,1.1
            Windows Slaves Plugin,1.3.1
            Pipeline,2.6
            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 ]
            Hide
            zanettea arrigo zanette added a comment -

            I did fix it cleaning the plugin folder and reinstalling 1.29.1 from scratch. Now it works.

            Show
            zanettea arrigo zanette added a comment - I did fix it cleaning the plugin folder and reinstalling 1.29.1 from scratch. Now it works.
            Hide
            tomdev Tom de Vries added a comment -

            Yesterday I downgraded the plugin to 1.28.x. Today upgraded to 1.29.1 and that seems to be working fine!

            Show
            tomdev Tom de Vries added a comment - Yesterday I downgraded the plugin to 1.28.x. Today upgraded to 1.29.1 and that seems to be working fine!
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Released As ssh-slaves-1.29.1
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            Hide
            dodoent Nenad Miksa added a comment -

            This resurfaces back in 1.29.2. Downgrading to 1.29.1 solves the issue for me.

            Show
            dodoent Nenad Miksa added a comment - This resurfaces back in 1.29.2. Downgrading to 1.29.1 solves the issue for me.
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            if you upgrade from 1.29.X, you would have to uninstall trilead-api plugin is no longer used and it is the source of the classpath error

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - if you upgrade from 1.29.X, you would have to uninstall trilead-api plugin is no longer used and it is the source of the classpath error
            Hide
            cowwoc cowwoc added a comment -

            Ivan Fernandez Calvo I don't have trilead-api plugin installed and yet I am getting this error in version 1.29.2 of this plugin. Please reopen this bug. It is not fixed.

            Show
            cowwoc cowwoc added a comment - Ivan Fernandez Calvo I don't have trilead-api plugin installed and yet I am getting this error in version 1.29.2 of this plugin. Please reopen this bug. It is not fixed.
            Hide
            cowwoc cowwoc added a comment -

            Nevermind. Upgrading to version 1.29.4 of this plugin fixes the problem. Thank you.

            Show
            cowwoc cowwoc added a comment - Nevermind. Upgrading to version 1.29.4 of this plugin fixes the problem. Thank you.

              People

              Assignee:
              ifernandezcalvo Ivan Fernandez Calvo
              Reporter:
              tomdev Tom de Vries
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: