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

JNLP not considering plain hostnames when evaluating NO_PROXY

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • remoting
    • None
    • Jenkins 2.89.2
      Jenkins remoting 3.1.4
      Jenkins swarm 3.7
    • Remoting 3.28

      Encountering a 502 Bad Gateway error when fetching the slave-agent.jnlp file through the swarm client. I have traced this down to being an issue with the way the no_proxy settings are evaluated in Jenkins remoting (swarm is currently evaluating the proxy settings correctly but remoting is not). It currently will ignore any no_proxy settings that consist of hostnames without a domain suffix, i.e. "localhost" or "jenkinsmaster".

      The use case for this is that I am running a docker swarm on a corporate proxy and need to be able to exclude my Jenkins master from the proxy in order for the slaves to be able to communicate.

      I believe this is a simple fix here: https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L132-L140

      The regex should be changed such that the '.' is optional and that the hostname/domain can have underscores '_'.

          [JENKINS-48778] JNLP not considering plain hostnames when evaluating NO_PROXY

          Adam Hodges created issue -
          Adam Hodges made changes -
          Link New: This issue is related to JENKINS-32326 [ JENKINS-32326 ]
          Adam Hodges made changes -
          Description Original: Encountering a 502 Bad Gateway error when fetching the slave-agent.jnlp file through the swarm client. I have traced this down to being an issue with the way the no_proxy settings are evaluated in Jenkins remoting (swarm is currently evaluating the proxy settings correctly but remoting is not). It currently will ignore any no_proxy settings that consist of hostnames without a domain suffix, i.e. "localhost" or "jenkinsmaster".

          The use case for this is that I am running a docker swarm on a corporate proxy and need to be able to exclude my Jenkins master from the proxy in order for the slaves to be able to communicate.

          I believe this is a simple fix here: [https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L132-L140]

          The regex should be changed such that the '.' is optional (\\.?)
          New: Encountering a 502 Bad Gateway error when fetching the slave-agent.jnlp file through the swarm client. I have traced this down to being an issue with the way the no_proxy settings are evaluated in Jenkins remoting (swarm is currently evaluating the proxy settings correctly but remoting is not). It currently will ignore any no_proxy settings that consist of hostnames without a domain suffix, i.e. "localhost" or "jenkinsmaster".

          The use case for this is that I am running a docker swarm on a corporate proxy and need to be able to exclude my Jenkins master from the proxy in order for the slaves to be able to communicate.

          I believe this is a simple fix here: [https://github.com/jenkinsci/remoting/blob/master/src/main/java/hudson/remoting/Util.java#L132-L140]

          The regex should be changed such that the '.' is optional and that the hostname/domain can have underscores '_'.
          Jeff Thompson made changes -
          Released As New: Remoting 3.28
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            ajhodges Adam Hodges
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: