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

Enable TCP keep alive on the agent side of the connection

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This is especially critical when JNLP agents are operating behind a NAT router with a short timeout on the routing table (i.e. running in a cloud who's name may or may not rhyme with awe-sure)

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/hudson/remoting/Engine.java
            src/main/java/hudson/remoting/Launcher.java
            src/main/java/hudson/remoting/jnlp/Main.java
            http://jenkins-ci.org/commit/remoting/ca8702173424f343ddd0bfec0b817f39c30d4549
            Log:
            [FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again

            • Most OSes have a default SO_KEEPALIVE of 2 hours, and perform keepalive without generating any significant traffic
              The master side of the connection already has SO_KEEPALIVE enabled, this just allows both OSes to keep their own
              guidance and therefore assist when tuning the agent side is more appropriate than changing the kernel parameters on
              the master side (as the master is handling the HTTP requests of users)
            • Would probably be perfectly safe to not even expose the -noKeepAlive option as the SO_KEEPALIVE should be invisible
              But there may be users that have the requirement to disable, so safer to provide the option
            • Change was developed against the stable-2.x branch
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/hudson/remoting/Engine.java src/main/java/hudson/remoting/Launcher.java src/main/java/hudson/remoting/jnlp/Main.java http://jenkins-ci.org/commit/remoting/ca8702173424f343ddd0bfec0b817f39c30d4549 Log: [FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again Most OSes have a default SO_KEEPALIVE of 2 hours, and perform keepalive without generating any significant traffic The master side of the connection already has SO_KEEPALIVE enabled, this just allows both OSes to keep their own guidance and therefore assist when tuning the agent side is more appropriate than changing the kernel parameters on the master side (as the master is handling the HTTP requests of users) Would probably be perfectly safe to not even expose the -noKeepAlive option as the SO_KEEPALIVE should be invisible But there may be users that have the requirement to disable, so safer to provide the option Change was developed against the stable-2.x branch
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/hudson/remoting/Engine.java
            src/main/java/hudson/remoting/Launcher.java
            src/main/java/hudson/remoting/jnlp/Main.java
            http://jenkins-ci.org/commit/remoting/e3f352697b745c8b2d98dd0beac2313920581720
            Log:
            [FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again (#110)

            • [FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again
            • Most OSes have a default SO_KEEPALIVE of 2 hours, and perform keepalive without generating any significant traffic
              The master side of the connection already has SO_KEEPALIVE enabled, this just allows both OSes to keep their own
              guidance and therefore assist when tuning the agent side is more appropriate than changing the kernel parameters on
              the master side (as the master is handling the HTTP requests of users)
            • Would probably be perfectly safe to not even expose the -noKeepAlive option as the SO_KEEPALIVE should be invisible
              But there may be users that have the requirement to disable, so safer to provide the option
            • Change was developed against the stable-2.x branch
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/hudson/remoting/Engine.java src/main/java/hudson/remoting/Launcher.java src/main/java/hudson/remoting/jnlp/Main.java http://jenkins-ci.org/commit/remoting/e3f352697b745c8b2d98dd0beac2313920581720 Log: [FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again (#110) [FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again Most OSes have a default SO_KEEPALIVE of 2 hours, and perform keepalive without generating any significant traffic The master side of the connection already has SO_KEEPALIVE enabled, this just allows both OSes to keep their own guidance and therefore assist when tuning the agent side is more appropriate than changing the kernel parameters on the master side (as the master is handling the HTTP requests of users) Would probably be perfectly safe to not even expose the -noKeepAlive option as the SO_KEEPALIVE should be invisible But there may be users that have the requirement to disable, so safer to provide the option Change was developed against the stable-2.x branch JENKINS-38541 Tweak help text for CLI -noKeepAlive option
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Merged to stable-2.x, will be in next release

            Show
            stephenconnolly Stephen Connolly added a comment - Merged to stable-2.x, will be in next release
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/3966b111f9f2f87d39854aefe870676fdd5cc4ae
            Log:
            [JENKINS-38539, JENKINS-37539] Update remoting from 2.62 to 2.62.2

            2.61 does not exist, there was an issue during the release
            Changes in 2.62: https://github.com/jenkinsci/remoting/blob/stable-2.x/CHANGELOG.md#2622

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/3966b111f9f2f87d39854aefe870676fdd5cc4ae Log: [JENKINS-38539, JENKINS-37539] Update remoting from 2.62 to 2.62.2 2.61 does not exist, there was an issue during the release Changes in 2.62: https://github.com/jenkinsci/remoting/blob/stable-2.x/CHANGELOG.md#2622 JENKINS-38539 ( https://issues.jenkins-ci.org/browse/JENKINS-38539 ) - Stability: Turn on SO_KEEPALIVE and provide CLI option to turn it off again. ( https://github.com/jenkinsci/remoting/pull/110 ) JENKINS-37539 ( https://issues.jenkins-ci.org/browse/JENKINS-37539 ) - Prevent <code>NullPointerException</code> in <code>Engine#connect()</code> when host or port parameters are <code>null</code> or empty. ( https://github.com/jenkinsci/remoting/pull/101 ) [CID-152201] - Fix resource leak in <code>remoting.jnlp.Main</code>. ( https://github.com/jenkinsci/remoting/pull/102 ) [CID-152200,CID-152202] - Resource leak in Encryption Cipher I/O streams on exceptional paths. ( https://github.com/jenkinsci/remoting/pull/104 )
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/7e0db20a2cfb08b49e32cf2ec8258ef3f4b3037e
            Log:
            [JENKINS-38539, JENKINS-37539] Update remoting from 2.62 to 2.62.2 (#2585)

            2.61 does not exist, there was an issue during the release
            Changes in 2.62: https://github.com/jenkinsci/remoting/blob/stable-2.x/CHANGELOG.md#2622

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/7e0db20a2cfb08b49e32cf2ec8258ef3f4b3037e Log: [JENKINS-38539, JENKINS-37539] Update remoting from 2.62 to 2.62.2 (#2585) 2.61 does not exist, there was an issue during the release Changes in 2.62: https://github.com/jenkinsci/remoting/blob/stable-2.x/CHANGELOG.md#2622 JENKINS-38539 ( https://issues.jenkins-ci.org/browse/JENKINS-38539 ) - Stability: Turn on SO_KEEPALIVE and provide CLI option to turn it off again. ( https://github.com/jenkinsci/remoting/pull/110 ) JENKINS-37539 ( https://issues.jenkins-ci.org/browse/JENKINS-37539 ) - Prevent <code>NullPointerException</code> in <code>Engine#connect()</code> when host or port parameters are <code>null</code> or empty. ( https://github.com/jenkinsci/remoting/pull/101 ) [CID-152201] - Fix resource leak in <code>remoting.jnlp.Main</code>. ( https://github.com/jenkinsci/remoting/pull/102 ) [CID-152200,CID-152202] - Resource leak in Encryption Cipher I/O streams on exceptional paths. ( https://github.com/jenkinsci/remoting/pull/104 )
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            pom.xml
            http://jenkins-ci.org/commit/jenkins/62a5dddb3c2b00c4602a504ffefd65320cf81915
            Log:
            Update remoting to 2.62.2

            This PR picks the latest available version of remoting stable-2.x. All the fixes have been integrated into remoting-3.0 and soaked enough.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/jenkins/62a5dddb3c2b00c4602a504ffefd65320cf81915 Log: Update remoting to 2.62.2 This PR picks the latest available version of remoting stable-2.x. All the fixes have been integrated into remoting-3.0 and soaked enough. JENKINS-38539 ( https://issues.jenkins-ci.org/browse/JENKINS-38539 ) - Stability: Turn on SO_KEEPALIVE by default and provide CLI option to turn it off again. ( https://github.com/jenkinsci/remoting/pull/110 ) JENKINS-37539 ( https://issues.jenkins-ci.org/browse/JENKINS-37539 ) - Prevent <code>NullPointerException</code> in <code>Engine#connect()</code> when host or port parameters are <code>null</code> or empty. ( https://github.com/jenkinsci/remoting/pull/101 ) [CID-152201] - Fix resource leak in <code>remoting.jnlp.Main</code>. ( https://github.com/jenkinsci/remoting/pull/102 ) [CID-152200,CID-152202] - Resource leak in Encryption Cipher I/O streams on exceptional paths. ( https://github.com/jenkinsci/remoting/pull/104 )

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: