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

JNLP slave should exclude non proxy hosts when connecting via HTTP proxy

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      https://issues.jenkins-ci.org/browse/JENKINS-6167
      The fix submitted for this issue does not take into account the excluded proxy hosts unlike the hudson.remoting.Util.openURLConnection method which implicitly excludes hosts.

      A fix using the same method as sun.net.www.protocol.http.HttpURLConnection is available here :
      https://github.com/hypnoce/remoting/commit/67dbd966e628c42a0aa4d3cd91a56a00b7f95030

      Thanks

        Attachments

          Issue Links

            Activity

            Hide
            etiennebec Etienne Bec added a comment -

            We're still experiencing the issue. See my last comment.

            Show
            etiennebec Etienne Bec added a comment - We're still experiencing the issue. See my last comment.
            Hide
            danielbeck Daniel Beck added a comment -

            Etienne Bec To clarify, this issue is fixed as described, but you're using yet another environment variable, and that one isn't used?

            Show
            danielbeck Daniel Beck added a comment - Etienne Bec To clarify, this issue is fixed as described, but you're using yet another environment variable, and that one isn't used?
            Hide
            etiennebec Etienne Bec added a comment - - edited

            I will give you some background. Our network is behind a corporate proxy and thus we need to go through it to access to Internet. That's why we have defined the two standard environment variables, http_proxy and no_proxy, to configure several tools (curl for instance), to use the proxy. The slaves and the master are on the same network so they can communicate directly, that's why we didn't set the system properties http.proxyHost and so on.

            We were previously running Jenkins 1.596.3 which uses remoting 2.47, and this version doesn't include the PR27. And with this PR the trouble begins because the slave started to take in account only the first env var I mentioned: http_proxy. no_proxy is never read. And the PR55 which is related to this issue doesn't fix this either. It just introduced the use of ProxySelector which automatically take in account the exception list ... defined by the system property http.nonProxyHosts. And as in the PR27 it reads the http_proxy env var as a fallback, but doesn't use no_proxy at all!

            To be more clear, we don't use the proxy features on our side. It's just that the slave started with the PR27 to read some env var it should not (because that's not how the JVM should be configured). So either we need to take in account no_proxy or we remove from the two methods the part which use http_proxy: https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L114 & https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L114.

            I've reopened this issue because to my understanding the goal of this issue wasn't just to add the support for http.nonProxyHosts but to correct PR27. Should we create a new issue?

            Show
            etiennebec Etienne Bec added a comment - - edited I will give you some background. Our network is behind a corporate proxy and thus we need to go through it to access to Internet. That's why we have defined the two standard environment variables, http_proxy and no_proxy , to configure several tools (curl for instance), to use the proxy. The slaves and the master are on the same network so they can communicate directly, that's why we didn't set the system properties http.proxyHost and so on. We were previously running Jenkins 1.596.3 which uses remoting 2.47, and this version doesn't include the PR27. And with this PR the trouble begins because the slave started to take in account only the first env var I mentioned: http_proxy . no_proxy is never read. And the PR55 which is related to this issue doesn't fix this either. It just introduced the use of ProxySelector which automatically take in account the exception list ... defined by the system property http.nonProxyHosts . And as in the PR27 it reads the http_proxy env var as a fallback, but doesn't use no_proxy at all! To be more clear, we don't use the proxy features on our side. It's just that the slave started with the PR27 to read some env var it should not (because that's not how the JVM should be configured). So either we need to take in account no_proxy or we remove from the two methods the part which use http_proxy : https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L114 & https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L114 . I've reopened this issue because to my understanding the goal of this issue wasn't just to add the support for http.nonProxyHosts but to correct PR27. Should we create a new issue?
            Hide
            danielbeck Daniel Beck added a comment -

            Probably best as a separate issue. This one has too much history IMO.

            Show
            danielbeck Daniel Beck added a comment - Probably best as a separate issue. This one has too much history IMO.
            Hide
            etiennebec Etienne Bec added a comment - - edited

            Looks like it has already been reported: https://issues.jenkins-ci.org/browse/JENKINS-32326

            I will mark this issue as resolved.

            Show
            etiennebec Etienne Bec added a comment - - edited Looks like it has already been reported: https://issues.jenkins-ci.org/browse/JENKINS-32326 I will mark this issue as resolved.

              People

              • Assignee:
                Unassigned
                Reporter:
                hypnoce Francis JAC
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: