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

broken HTTP_PROXY handling on jenkins-slave (JNLP)

      broken HTTP_PROXY handling on jenkins-slave (JNLP)
      The proxy exclusion list (http.nonProxyHosts, no_proxy) is not taken into account on the jenkins-slave side.
      This has been observed in our jenkins master/slave environment which uses JNLP.

      Support for HTTP_PROXY handling on jenkins-slave side has been added with jenkins version 1.606.
      Unfortunately that does not take the proxy exclusion list into account (e.g. defined by no_proxy env variable on linux).
      This forces the slave to always use the proxy. Even for destinations which would be excluded by no_proxy.

      Jenkins uses org.jenkins-ci.main:remoting for handling http proxy functionality.
      Jenkins includes version 2.53.2 of org.jenkins-ci.main:remoting which contains the error described above.

      possible solution:
      1.) create new release of org.jenkins-ci.main:remoting which already contains the fix in it's master branch.
      2.) update jenkins' to use this new version of org.jenkins-ci.main:remoting

      see also:

          [JENKINS-32326] broken HTTP_PROXY handling on jenkins-slave (JNLP)

          Valentin Maechler created issue -
          Valentin Maechler made changes -
          Description Original: *broken HTTP_PROXY handling on jenkins-slave (JNLP)*
          The proxy exclusion list (http.nonProxyHosts, no_proxy) is not taken into account on the jenkins-slave side.
          This has been observed in our jenkins master/slave environment which uses JNLP.

          Support for HTTP_PROXY handling on jenkins-slave side has been added with jenkins version 1.606.
          Unfortunately that does not take the proxy exclusion list into account (e.g. defined by no_proxy env variable on linux).
          This forces the slave to always use the proxy. Even for destinations which would be excluded by no_proxy.

          Jenkins uses [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting] for handling http proxy functionality.
          Jenkins includes version 2.53.2 of [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting] which contains the error described above.

          possible solution:
          1.) create new release of [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting] which *already *contains the fix in it's master branch.
          2.) update jenkins' to use this new version of [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting]

          see also:
          - commit of fix in master branch of org.jenkins-ci.main:remoting
              [https://github.com/jenkinsci/remoting/commit/56d30acb89f5626320d6b47585053674a5fdfb78]
              
          New: *broken HTTP_PROXY handling on jenkins-slave (JNLP)*
          The proxy exclusion list (http.nonProxyHosts, no_proxy) is not taken into account on the jenkins-slave side.
          This has been observed in our jenkins master/slave environment which uses JNLP.

          Support for HTTP_PROXY handling on jenkins-slave side has been added with jenkins version 1.606.
          Unfortunately that does not take the proxy exclusion list into account (e.g. defined by no_proxy env variable on linux).
          This forces the slave to always use the proxy. Even for destinations which would be excluded by no_proxy.

          Jenkins uses [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting] for handling http proxy functionality.
          Jenkins includes version 2.53.2 of [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting] which contains the error described above.

          possible solution:
          1.) create new release of [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting] which *already* contains the fix in it's master branch.
          2.) update jenkins' to use this new version of [org.jenkins-ci.main:remoting|https://github.com/jenkinsci/remoting]

          see also:
          - commit of fix in master branch of org.jenkins-ci.main:remoting
              [https://github.com/jenkinsci/remoting/commit/56d30acb89f5626320d6b47585053674a5fdfb78]
              
          Daniel Beck made changes -
          Assignee New: Oleg Nenashev [ oleg_nenashev ]

          Etienne Bec added a comment -

          We're encountering the same issue (see comment section of JENKINS-28289 for further details).

          It should also be noted that the proxy configuration defined by the system properties does not have precedence over the one defined by the environment variables. Indeed if you set both, you would expect the slave to actually work because http.nonProxyHosts is automatically taken in account by the JVM. But no, looks like some part rely on http_proxy (and obviously don't use no_proxy). Unless you unset all your proxy env var, the slave won't work even if your system properties are correct.

          It means that on a host where you need to set those env var, there's no workaround to make the slave work.

          Etienne Bec added a comment - We're encountering the same issue (see comment section of JENKINS-28289 for further details). It should also be noted that the proxy configuration defined by the system properties does not have precedence over the one defined by the environment variables. Indeed if you set both, you would expect the slave to actually work because http.nonProxyHosts is automatically taken in account by the JVM. But no, looks like some part rely on http_proxy (and obviously don't use no_proxy ). Unless you unset all your proxy env var, the slave won't work even if your system properties are correct. It means that on a host where you need to set those env var, there's no workaround to make the slave work.

          Etienne Bec added a comment -

          Quick fix.

          Etienne Bec added a comment - Quick fix.
          Etienne Bec made changes -
          Remote Link New: This issue links to "PR#84 (Web Link)" [ 14348 ]
          Etienne Bec made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Etienne Bec made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ] New: Etienne Bec [ etiennebec ]
          Etienne Bec made changes -
          Assignee Original: Etienne Bec [ etiennebec ] New: Oleg Nenashev [ oleg_nenashev ]

          Code changed in jenkins
          User: Etienne Bec
          Path:
          src/main/java/hudson/remoting/Util.java
          src/test/java/hudson/remoting/UtilTest.java
          http://jenkins-ci.org/commit/remoting/a1bdc233aee6dd13fd76f488adb2aa436a7e74f5
          Log:
          [FIXED JENKINS-32326] Support no_proxy environment variable (#84)

          Change-Id: I894e7831677ee39c37020b0fab0e6db5b290f9ca

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Etienne Bec Path: src/main/java/hudson/remoting/Util.java src/test/java/hudson/remoting/UtilTest.java http://jenkins-ci.org/commit/remoting/a1bdc233aee6dd13fd76f488adb2aa436a7e74f5 Log: [FIXED JENKINS-32326] Support no_proxy environment variable (#84) Change-Id: I894e7831677ee39c37020b0fab0e6db5b290f9ca
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            oleg_nenashev Oleg Nenashev
            maecval Valentin Maechler
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: