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

Use trilead-api plugin instead trilead-ssh2 from core

    XMLWordPrintable

Details

    • ssh-slaves-1.29.1

    Description

      Remove the dependency of the Trilead-ssh2 plugin and use the Trilead-api plugins instead, this means that ssh-slaves plugins no longer uses the trilead-ssh2 plugin provider by the Jenkins core, it will use the Trilead-api version, so now it is possible to upgrade the plugin ssh library without to upgrade the core.

      Attachments

        Issue Links

          Activity

            ifernandezcalvo Ivan Fernandez Calvo created issue -
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Summary Use trilead-api plugin instead trilead-ssh2 core Use trilead-api plugin instead trilead-ssh2 from core
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Released As ssh-slave-1.29.0
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            jzila John Zila added a comment -

            FYI this breaks the ec2-fleet plugin.

            jzila John Zila added a comment - FYI this breaks the ec2-fleet plugin.
            jzila John Zila added a comment -
            SSHLauncher{host='10.0.0.21', port=22, credentialsId='b6a4fe2c-9ba5-4052-b91c-7a15e913df37', jvmOptions='-Xmx8192m', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=false}
            [11/20/18 00:29:56] [SSH] Opening SSH connection to 10.0.0.21:22.
            [11/20/18 00:29:57] [SSH] SSH host key matches key seen previously for this host. Connection will be allowed.
            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 00:29:57] Launch failed - cleaning up connection
            [11/20/18 00:29:57] [SSH] Connection closed. 
            jzila John Zila added a comment - SSHLauncher{host='10.0.0.21', port=22, credentialsId='b6a4fe2c-9ba5-4052-b91c-7a15e913df37', jvmOptions='-Xmx8192m', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=false} [11/20/18 00:29:56] [SSH] Opening SSH connection to 10.0.0.21:22. [11/20/18 00:29:57] [SSH] SSH host key matches key seen previously for this host. Connection will be allowed. 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 00:29:57] Launch failed - cleaning up connection [11/20/18 00:29:57] [SSH] Connection closed.
            mecorusfc Mike Corum added a comment -

            This "fix" busted all my jobs that use SSH slaves - they all get a classNotFoundException on the trilead/ssh2/Base64 class.  I assumed there was some other dependency that this required so I made sure to be on the very latest Jenkins and the very latest of all my plugins.  It still broke everything.  

            What do we have to do in order to make this version work?  It's seriously busted.

            mecorusfc Mike Corum added a comment - This "fix" busted all my jobs that use SSH slaves - they all get a classNotFoundException on the trilead/ssh2/Base64 class.  I assumed there was some other dependency that this required so I made sure to be on the very latest Jenkins and the very latest of all my plugins.  It still broke everything.   What do we have to do in order to make this version work?  It's seriously busted.
            mecorusfc Mike Corum added a comment -

            Can this "fix" be reversed?  It completely breaks all uses of the SSH Slaves plugin.  Any job using this plugin immediately gets a stack trace with a ClassNotFoundException with the trilead ssh2 Base64 class.  This includes being at the very latest release of Jenkins and the latest of all other plugins.  I tried reverting the Jenkins to the previous release but it didn't help.

            mecorusfc Mike Corum added a comment - Can this "fix" be reversed?  It completely breaks all uses of the SSH Slaves plugin.  Any job using this plugin immediately gets a stack trace with a ClassNotFoundException with the trilead ssh2 Base64 class.  This includes being at the very latest release of Jenkins and the latest of all other plugins.  I tried reverting the Jenkins to the previous release but it didn't help.
            mecorusfc Mike Corum made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            arthur7834 king arthur added a comment -

            did someone help to fix it, my jenkins has down for 1 day

            arthur7834 king arthur added a comment - did someone help to fix it, my jenkins has down for 1 day
            yyl1007 ye yulei added a comment -

            I also have the same problem. I have rolled back the SSH slave plug-in to the previous version, waiting for repair.

            yyl1007 ye yulei added a comment - I also have the same problem. I have rolled back the SSH slave plug-in to the previous version, waiting for repair.
            yyl1007 ye yulei added a comment -

            Using SSH Slaves 1.29.0 to configure the slave page, you can add credentials, but you can't choose. By default, you limit the current and only the current

            yyl1007 ye yulei added a comment - Using SSH Slaves 1.29.0 to configure the slave page, you can add credentials, but you can't choose. By default, you limit the current and only the current
            arthur7834 king arthur added a comment -

            thank you, yyl1007, jenkins is back!

            arthur7834 king arthur added a comment - thank you, yyl1007 , jenkins is back!
            mej933 Mejdoub Mejdi added a comment -

            The rollback work fine. Thanks guys.

            mej933 Mejdoub Mejdi added a comment - The rollback work fine. Thanks guys.
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            I added a section on the troubleshooting guide about this issue 1.29.0 Breaks compatibility with Cloud plugins that do not use trilead-api plugin as dependency, also added to the breaking changes that this version breaks backward with Cloud plugins. I will manage to make PRs to all the plugins that have ssh-slaves as a dependency to move forward and remove trilead-ssh2 core library as dependency on plugins.

            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited I added a section on the troubleshooting guide about this issue 1.29.0 Breaks compatibility with Cloud plugins that do not use trilead-api plugin as dependency , also added to the breaking changes that this version breaks backward with Cloud plugins. I will manage to make PRs to all the plugins that have ssh-slaves as a dependency to move forward and remove trilead-ssh2 core library as dependency on plugins.
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Priority Minor [ 4 ] Critical [ 2 ]

            I also commented about the issue in the developers google group https://groups.google.com/forum/#!topic/jenkinsci-dev/Ba69w3M-jX0

            ifernandezcalvo Ivan Fernandez Calvo added a comment - I also commented about the issue in the developers google group https://groups.google.com/forum/#!topic/jenkinsci-dev/Ba69w3M-jX0
            davida2009 David Aldrich added a comment -

            This is pretty nasty. I am running Jenkins 2.138.3 LTS and updated to SSH Slaves 1.29.0 this morning. Restarting Jenkins resulted in an exception on the entire browser window. Jenkins UI was blocked. Had to rollback the plugin manually from the command line.

            davida2009 David Aldrich added a comment - This is pretty nasty. I am running Jenkins 2.138.3 LTS and updated to SSH Slaves 1.29.0 this morning. Restarting Jenkins resulted in an exception on the entire browser window. Jenkins UI was blocked. Had to rollback the plugin manually from the command line.
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is duplicated by JENKINS-54720 [ JENKINS-54720 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is duplicated by JENKINS-54713 [ JENKINS-54713 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is duplicated by JENKINS-54716 [ JENKINS-54716 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is duplicated by JENKINS-54712 [ JENKINS-54712 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is duplicated by JENKINS-54708 [ JENKINS-54708 ]
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            if this PR passes the CI I will merge and release a new version without mask the core classes this fix the issue, then I will include the dependency on all plugins that depends on ssh-slaves-plugin, finally, I will mask the dependency on trilead-api plugin

            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited if this PR passes the CI I will merge and release a new version without mask the core classes this fix the issue, then I will include the dependency on all plugins that depends on ssh-slaves-plugin, finally, I will mask the dependency on trilead-api plugin
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Released As ssh-slave-1.29.0 ssh-slaves-1.29.1
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is duplicated by JENKINS-54061 [ JENKINS-54061 ]
            dnusbaum Devin Nusbaum made changes -
            Link This issue relates to JENKINS-54724 [ JENKINS-54724 ]

            I just upgraded the ssh-slave from 1.28.1 to 1.29.1, and immediately got the same stack-trace.

            Downgrading to 1.29.0 also produced the stack-trace.

             

            Finally, back on 1.28.1, everything is back to normal.

             

            On each of the above mentioned versions, I've tested both trilead-api 1.0.0 and 1.0.1 - but this plugin version does not seem to affect the problem.

             

            fsteff Flemming Steffensen added a comment - I just upgraded the ssh-slave from 1.28.1 to 1.29.1 , and immediately got the same stack-trace. Downgrading to 1.29.0 also produced the stack-trace.   Finally, back on 1.28.1 , everything is back to normal.   On each of the above mentioned versions, I've tested both trilead-api 1.0.0 and 1.0.1 - but this plugin version does not seem to affect the problem.  
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            I have confirmation on a few issues that the upgrade to 1.29.1 fix the issue, it required a restart if not yo do not change the plugin, check that you are using the right version of the plugin by executing the following script in the Jenkins script console

            result = ''
            for (plugin in Jenkins.instance.pluginManager.plugins) {
            	result = result + "${plugin.displayName}" + ',' + "${plugin.version}\n"
            }
            return result
            

            JENKINS-54061
            JENKINS-54713

            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited I have confirmation on a few issues that the upgrade to 1.29.1 fix the issue, it required a restart if not yo do not change the plugin, check that you are using the right version of the plugin by executing the following script in the Jenkins script console result = '' for (plugin in Jenkins.instance.pluginManager.plugins) { result = result + "${plugin.displayName}" + ',' + "${plugin.version}\n" } return result JENKINS-54061 JENKINS-54713

            ifernandezcalvo

            I were manually installing the plugins, and stopping the Jenkins service before each installation.

            The only two plugins changed on my system were ssh-slave and trilead-api.

            I manually tried these combinations (in this order), before I wrote here:

             

            1.29.1 + 1.0.1 = Stacktrace on boot

             1.29.1 + 1.0.0 = Stacktrace on boot

            1.29.0 + 1.0.0 = Stacktrace on boot

            1.28.1 + 1.0.0 = Works

            1.28.1 + 1.0.1 = Works

            1.29.0 + 1.0.1 = Stacktrace on boot

             

            Ended up using this combination:

            1.28.1 + 1.0.1 = Works

             

             

            fsteff Flemming Steffensen added a comment - ifernandezcalvo I were manually installing the plugins, and stopping the Jenkins service before each installation. The only two plugins changed on my system were ssh-slave and trilead-api. I manually tried these combinations (in this order), before I wrote here:   1.29.1 + 1.0.1 = Stacktrace on boot  1.29.1 + 1.0.0 = Stacktrace on boot 1.29.0 + 1.0.0 = Stacktrace on boot 1.28.1 + 1.0.0 = Works 1.28.1 + 1.0.1 = Works 1.29.0 + 1.0.1 = Stacktrace on boot   Ended up using this combination: 1.28.1 + 1.0.1 = Works    
            clausewitz45 Csaba Sari added a comment -

            Hi ifernandezcalvo

            I can confirm fsteff's report, exactly the same issue on CentOS 7, with Jenkins LTS 2.138.3. Only the 1.28.1 works for me. 

            regards,

            Csaba

            clausewitz45 Csaba Sari added a comment - Hi ifernandezcalvo ,  I can confirm fsteff 's report, exactly the same issue on CentOS 7, with Jenkins LTS 2.138.3. Only the 1.28.1 works for me.  regards, Csaba
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            ssh-slaves 1.28.1 does not use trilead-api, it was introduced in 1.29.0.

            I have tested a few stuff

            • A fresh installation of Jenkins 2.152, I do not see the issue
            • A fresh installation of Jenkins 2.73.3(I choose this because you can not install 1.29.X), then upgrade to 2.152 and upgrade the plugins, I do not see the issue

            You can test the same if you want:

            • Copy your JENKINS_HOME and your jenkins.war to a test machine
            • Go to the test machine
            • Go to the JENKINS_HOME folder
            • Remove the plugin from the plugins folder rm -fr plugins/ssh-slaves* (the asterisk matters)
            • Start Jenkins 'JENKINS_HOME=$(pwd) java -jar jenkins.war'
            • Enter in the test instance on port 8080 'http://test.exampl.com:8080'
            • Upgrade the plugin
            • Restart
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited ssh-slaves 1.28.1 does not use trilead-api, it was introduced in 1.29.0. I have tested a few stuff A fresh installation of Jenkins 2.152, I do not see the issue A fresh installation of Jenkins 2.73.3(I choose this because you can not install 1.29.X), then upgrade to 2.152 and upgrade the plugins, I do not see the issue You can test the same if you want: Copy your JENKINS_HOME and your jenkins.war to a test machine Go to the test machine Go to the JENKINS_HOME folder Remove the plugin from the plugins folder rm -fr plugins/ssh-slaves * (the asterisk matters) Start Jenkins 'JENKINS_HOME=$(pwd) java -jar jenkins.war' Enter in the test instance on port 8080 'http://test.exampl.com:8080' Upgrade the plugin Restart

            People

              ifernandezcalvo Ivan Fernandez Calvo
              ifernandezcalvo Ivan Fernandez Calvo
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: