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

Set ssh KeepAlive

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

      Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it hasn't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule out ssh/tcp route issues.

        Attachments

          Activity

          bbva BBVA created issue -
          bbva BBVA made changes -
          Field Original Value New Value
          Description Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

          Long: We have a few connections from master to slave using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it haven't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule ssh/tcp route issues.
          Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

          Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it haven't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule ssh/tcp route issues.
          bbva BBVA made changes -
          Description Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

          Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it haven't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule ssh/tcp route issues.
          Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

          Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it hasn't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule ssh/tcp route issues.
          bbva BBVA made changes -
          Description Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

          Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it hasn't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule ssh/tcp route issues.
          Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

          Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it hasn't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule out ssh/tcp route issues.
          Hide
          mjshi Mingjiang Shi added a comment - - edited

          +1 to this improvement.

          I have found a workaround for this.
          1. Change the /etc/ssh/ssh_config by appending the following line to the end of this file. This tells the ssh client to send nop command periodically to avoid the ssh connection being disconnected. The unit of 80 is seconds. You may tune this parameter based on your network condition.

          ServerAliveInterval 80
          

          2. In the Jenkins slave configuration page, change the Launch method to "Launch slave via execution of command on the Master". See the Jenkins built-in help for more details.

          So far, I haven't see any issues in this configuration. Hope this helps.

          Show
          mjshi Mingjiang Shi added a comment - - edited +1 to this improvement. I have found a workaround for this. 1. Change the /etc/ssh/ssh_config by appending the following line to the end of this file. This tells the ssh client to send nop command periodically to avoid the ssh connection being disconnected. The unit of 80 is seconds. You may tune this parameter based on your network condition. ServerAliveInterval 80 2. In the Jenkins slave configuration page, change the Launch method to "Launch slave via execution of command on the Master". See the Jenkins built-in help for more details. So far, I haven't see any issues in this configuration. Hope this helps.
          Hide
          gionn Giovanni Toraldo (ClouDesire) added a comment -

          +1 to add an option to configure keep-alive along with the other timeout configurations.

          Show
          gionn Giovanni Toraldo (ClouDesire) added a comment - +1 to add an option to configure keep-alive along with the other timeout configurations.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 159772 ] JNJira + In-Review [ 180120 ]
          ifernandezcalvo Ivan Fernandez Calvo made changes -
          Assignee Kohsuke Kawaguchi [ kohsuke ] Ivan Fernandez Calvo [ ifernandezcalvo ]
          Hide
          ifernandezcalvo Ivan Fernandez Calvo added a comment -

          This can be configured by setting ClientAliveInterval or TCPKeepAlive on the SSH server (/etc/ssh/sshd_config), also by setting ServerAliveInterval or TCPKeepAlive options for the user connection (/etc/ssh/ssh_config or ~/.ssh/ssh_config)

          https://www.freebsd.org/cgi/man.cgi?sshd_config(5)
          https://www.freebsd.org/cgi/man.cgi?ssh_config(5)

          Show
          ifernandezcalvo Ivan Fernandez Calvo added a comment - This can be configured by setting ClientAliveInterval or TCPKeepAlive on the SSH server (/etc/ssh/sshd_config), also by setting ServerAliveInterval or TCPKeepAlive options for the user connection (/etc/ssh/ssh_config or ~/.ssh/ssh_config) https://www.freebsd.org/cgi/man.cgi?sshd_config(5 ) https://www.freebsd.org/cgi/man.cgi?ssh_config(5 )
          ifernandezcalvo Ivan Fernandez Calvo made changes -
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Closed [ 6 ]

            People

            Assignee:
            ifernandezcalvo Ivan Fernandez Calvo
            Reporter:
            bbva BBVA
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: