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

Jenkins slave.jar doesn't close HTTP connections properly

    Details

    • Similar Issues:

      Description

      We use kubernetes-plugin to launch slaves. In a certain scenario, due to the Slave -> Jenkins connection timeout being very small (100s), the container couldn't connect to the Jenkins instance in time to get the JNLP arguments and it kept retrying forever. However, it did not close the HTTP connection for any of them and the QEMU process hosting the Jenkins instance ran out of file descriptors (which were being handled by the SLIRP stack via the -hostfwd option). All of the fds were stuck at FIN_WAIT2

        Attachments

          Activity

          nehaljwani Nehal J Wani created issue -
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nehal J Wani
          Path:
          src/main/java/hudson/remoting/Launcher.java
          http://jenkins-ci.org/commit/remoting/75f9faba9890d5e26db5a13bd87913b57c69fbf7
          Log:
          [FIXED JENKINS-42371] - Call disconnect() on HttpURLConnection object (#152)

          [FIXED JENKINS-42371] - Call disconnect() on HttpURLConnection object

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nehal J Wani Path: src/main/java/hudson/remoting/Launcher.java http://jenkins-ci.org/commit/remoting/75f9faba9890d5e26db5a13bd87913b57c69fbf7 Log: [FIXED JENKINS-42371] - Call disconnect() on HttpURLConnection object (#152) [FIXED JENKINS-42371] - Call disconnect() on HttpURLConnection object
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          oleg_nenashev Oleg Nenashev made changes -
          Labels lts-candidate
          nehaljwani Nehal J Wani made changes -
          Assignee Nehal J Wani [ nehaljwani ]
          nehaljwani Nehal J Wani made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          nehaljwani Nehal J Wani made changes -
          Description We use kubernetes-plugin to launch slaves. In a certain scenario, due to the Slave -> jJnkins connection timeout being very small (100s), the container couldn't connect to the Jenkins instance in time to get the JNLP arguments and it kept retrying forever. However, it did not close the HTTP connection for any of them and the QEMU process hosting the Jenkins instance ran out of file descriptors (which were being handled by the SLIRP stack via the -hostfwd option). All of the fds were stuck at FIN_WAIT2


          * The problem of having the slave -> jenkins connection timeout not being configurable has been fixed by: https://github.com/jenkinsci/kubernetes-plugin/pull/141
          * The problem of QEMU VM not timing out on fds stuck at FIN_WAIT2 is being tracked at: https://bugs.launchpad.net/qemu/+bug/1668273
          * The problem of not closing HTTP Connections cleanly has a PR at: https://github.com/jenkinsci/remoting/pull/152
          We use kubernetes-plugin to launch slaves. In a certain scenario, due to the Slave -> Jenkins connection timeout being very small (100s), the container couldn't connect to the Jenkins instance in time to get the JNLP arguments and it kept retrying forever. However, it did not close the HTTP connection for any of them and the QEMU process hosting the Jenkins instance ran out of file descriptors (which were being handled by the SLIRP stack via the -hostfwd option). All of the fds were stuck at FIN_WAIT2


          * The problem of having the slave -> jenkins connection timeout not being configurable has been fixed by: https://github.com/jenkinsci/kubernetes-plugin/pull/141
          * The problem of QEMU VM not timing out on fds stuck at FIN_WAIT2 is being tracked at: https://bugs.launchpad.net/qemu/+bug/1668273
          * The problem of not closing HTTP Connections cleanly has a PR at: https://github.com/jenkinsci/remoting/pull/152
          oleg_nenashev Oleg Nenashev made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          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/b6e4fb4b821eb623993914ecd3c24f8d934802f3
          Log:
          [FIXES JENKINS-42371] - Update remoting from 3.5 to 3.7 (#2773)

          • [FIXES JENKINS-42371] - Update remoting to 3.6

          Fixed issues:

          • Remoting 3.6 has been burned
          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/b6e4fb4b821eb623993914ecd3c24f8d934802f3 Log: [FIXES JENKINS-42371] - Update remoting from 3.5 to 3.7 (#2773) [FIXES JENKINS-42371] - Update remoting to 3.6 Fixed issues: JENKINS-42371 ( https://issues.jenkins-ci.org/browse/JENKINS-42371 ) - Properly close the `URLConnection` when parsing connection arguments from the JNLP file. It was causing a descriptor leak in the case of multiple connection attempts. ( PR #152 ( https://github.com/jenkinsci/remoting/pull/152 )) Remoting 3.6 has been burned
          olivergondza Oliver Gond┼ża made changes -
          Labels lts-candidate 2.46.1-fixed
          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/3e3806ae1db1b96968631e27ce230637fd469fa7
          Log:
          [FIXES JENKINS-42371] - Update remoting from 3.5 to 3.7 (#2773)

          • [FIXES JENKINS-42371] - Update remoting to 3.6

          Fixed issues:

          • Remoting 3.6 has been burned

          (cherry picked from commit b6e4fb4b821eb623993914ecd3c24f8d934802f3)

          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/3e3806ae1db1b96968631e27ce230637fd469fa7 Log: [FIXES JENKINS-42371] - Update remoting from 3.5 to 3.7 (#2773) [FIXES JENKINS-42371] - Update remoting to 3.6 Fixed issues: JENKINS-42371 ( https://issues.jenkins-ci.org/browse/JENKINS-42371 ) - Properly close the `URLConnection` when parsing connection arguments from the JNLP file. It was causing a descriptor leak in the case of multiple connection attempts. ( PR #152 ( https://github.com/jenkinsci/remoting/pull/152 )) Remoting 3.6 has been burned (cherry picked from commit b6e4fb4b821eb623993914ecd3c24f8d934802f3)

            People

            • Assignee:
              nehaljwani Nehal J Wani
              Reporter:
              nehaljwani Nehal J Wani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: