• Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Minor Minor
    • ssh-slaves-plugin
    • None

      The only SSH provider used now is the trilead-ssh2 library, there is not a direct way to replace this library with other implementation or use the SSH native client, thus we want to make the SSH implementation used pluggable, then you can choose the implementation used to connect by SSH. We are going to create an SSHProvider interface and implement two providers the current one trilead-ssh2 and a new native client provider. 

          [JENKINS-55363] Support different SSH providers

          Thai Pham added a comment - - edited

          Is there any plan to work on this? I think that the SSH native client worked more reliably for me when I used the `ec2` plugin with the SSH process enabled. After switching to the `ec2-fleet` plugin, which uses this plugin as a computer connector, I started to see more and more instances getting terminated

          Apr 08, 2019 6:55:13 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run
          INFO: I/O error in channel i-0544c80944d28d2a7
          java.io.IOException: Unexpected termination of the channel
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
          Caused by: java.io.EOFException
          at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2681)
          at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3156)
          at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:862)
          at java.io.ObjectInputStream.<init>(ObjectInputStream.java:358)
          at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49)
          at hudson.remoting.Command.readFrom(Command.java:140)
          at hudson.remoting.Command.readFrom(Command.java:126)
          at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36)
          at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)

          TBH, I'm not sure if this is an issue of the remoting plugin or not but it didn't happen to me this often when I used the SSH process client with the `ec2` plugin.

          Thai Pham added a comment - - edited Is there any plan to work on this? I think that the SSH native client worked more reliably for me when I used the `ec2` plugin with the SSH process enabled. After switching to the `ec2-fleet` plugin, which uses this plugin as a computer connector, I started to see more and more instances getting terminated Apr 08, 2019 6:55:13 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run INFO: I/O error in channel i-0544c80944d28d2a7 java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77) Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2681) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3156) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:862) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:358) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49) at hudson.remoting.Command.readFrom(Command.java:140) at hudson.remoting.Command.readFrom(Command.java:126) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63) TBH, I'm not sure if this is an issue of the remoting plugin or not but it didn't happen to me this often when I used the SSH process client with the `ec2` plugin.

          I am working on this one, right now I have some stuff but it is not ready to use yet. About your issue, you would check the troubleshooting guide

          Ivan Fernandez Calvo added a comment - I am working on this one, right now I have some stuff but it is not ready to use yet. About your issue, you would check the troubleshooting guide

          Thai Pham added a comment -

          Awesome!

          I've tried a few different ways to improve the connectivity between the Jenkins master and the slaves but had no luck so far. I tried disabling PingThread as suggested by https://speakerdeck.com/onenashev/day-of-jenkins-2017-dealing-with-agent-connectivity-issues?slide=29 but haven't found anything that could lead to the root cause as all the stack trace patterns were the same as the one I posted above. I also tried reducing the TCP keepalive settings on both the master and the slaves but it didn't improve anything.

          I look forwards to using the new feature as I believe it will solve our issue.

          Thai Pham added a comment - Awesome! I've tried a few different ways to improve the connectivity between the Jenkins master and the slaves but had no luck so far. I tried disabling PingThread as suggested by  https://speakerdeck.com/onenashev/day-of-jenkins-2017-dealing-with-agent-connectivity-issues?slide=29  but haven't found anything that could lead to the root cause as all the stack trace patterns were the same as the one I posted above. I also tried reducing the TCP keepalive settings on both the master and the slaves but it didn't improve anything. I look forwards to using the new feature as I believe it will solve our issue.

          Did you try to disable the Slave+To+Master+Access+Control? I've found it several times related to random disconnections.

          Ivan Fernandez Calvo added a comment - Did you try to disable the Slave+To+Master+Access+Control ? I've found it several times related to random disconnections.

          Thai Pham added a comment -

          ifernandezcalvo, I didn't try it as it seems to be against the general recommendations. I doubt that it improve anything as I don't have any issue when I use the `ec2` plugin which I believe doesn't use the `ssh-slaves-plugin` to connect to the slaves.

          Thai Pham added a comment - ifernandezcalvo , I didn't try it as it seems to be against the general recommendations. I doubt that it improve anything as I don't have any issue when I use the `ec2` plugin which I believe doesn't use the `ssh-slaves-plugin` to connect to the slaves.

          ec2 plugin used SSH or JNLP depends on how you configure it, please do not hijack this Jira issue to get support if you have questions, please use the google groups, if you have an issue report it on the plugin you use with enough data to replicate it. see How to report an issue

          Ivan Fernandez Calvo added a comment - ec2 plugin used SSH or JNLP depends on how you configure it, please do not hijack this Jira issue to get support if you have questions, please use the google groups, if you have an issue report it on the plugin you use with enough data to replicate it. see How to report an issue

          Thai Pham added a comment -

          ifernandezcalvo, I meant to answer your previous comments, didn't mean to hijack it to get support. Anyway, how is the progress of this ticket? I can help to test it if you need a hand.

          Thai Pham added a comment - ifernandezcalvo , I meant to answer your previous comments, didn't mean to hijack it to get support. Anyway, how is the progress of this ticket? I can help to test it if you need a hand.

          Thai Pham added a comment -

          ifernandezcalvo do you happen to have any progress on implementing this feature?

          Thai Pham added a comment - ifernandezcalvo do you happen to have any progress on implementing this feature?

          I'm working on this branch https://github.com/jenkinsci/ssh-slaves-plugin/tree/ssh-slaves-2.0 it is not ready to use yet

          Ivan Fernandez Calvo added a comment - I'm working on this branch https://github.com/jenkinsci/ssh-slaves-plugin/tree/ssh-slaves-2.0 it is not ready to use yet

            ifernandezcalvo Ivan Fernandez Calvo
            ifernandezcalvo Ivan Fernandez Calvo
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: