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

Can't rely on hudson.TcpSlaveAgentListener.hostName to run JNLP slave with a reverse proxy

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core, remoting
    • None

      `hudson.TcpSlaveAgentListener.hostName` can be used to set X-Jenkins-CLI-Host header, which is used by jenkins CLI to determine the TCP channel target host.

      When jenkins is hosted with a reverse proxy and you try to setup a Java Web Start slave, this one tries to connect to reverse proxy for TCP channel, even when this parameter is set on master.

      JNLP slave do run the remoting lib (downloaded as "slave.jar") which doesn't handle X-Jenkins-CLI-Host. Arguably this header is for CLI, not JNLP

      I suggest to introduce a new X-Jenkins-JNLP-Host (to match X-Jenkins-JNLP-Port) that would be exposed by hudson/TcpSlaveAgentListener/index.jelly to reflect configured hudson.TcpSlaveAgentListener.hostName

          [JENKINS-27218] Can't rely on hudson.TcpSlaveAgentListener.hostName to run JNLP slave with a reverse proxy

          Daniel Beck added a comment -

          Isn't this covered by the Advanced 'Tunnel Options' (or similar) of JNLP slaves?

          Daniel Beck added a comment - Isn't this covered by the Advanced 'Tunnel Options' (or similar) of JNLP slaves?

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          src/main/java/hudson/remoting/Engine.java
          http://jenkins-ci.org/commit/remoting/5e3042bebc23d57eff50aea0ce454bfe5dee4145
          Log:
          JENKINS-27218 support X-Jenkins-JNLP-Host

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/remoting/Engine.java http://jenkins-ci.org/commit/remoting/5e3042bebc23d57eff50aea0ce454bfe5dee4145 Log: JENKINS-27218 support X-Jenkins-JNLP-Host

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly
          http://jenkins-ci.org/commit/jenkins/342dc735b0df9e0be0e7e436ccc016bc6515e8e7
          Log:
          [FIXED JENKINS-27218]

          Advertise X-JNLP-Host-Name correctly

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly http://jenkins-ci.org/commit/jenkins/342dc735b0df9e0be0e7e436ccc016bc6515e8e7 Log: [FIXED JENKINS-27218] Advertise X-JNLP-Host-Name correctly

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4099
          [FIXED JENKINS-27218] (Revision 342dc735b0df9e0be0e7e436ccc016bc6515e8e7)

          Result = SUCCESS
          kohsuke : 342dc735b0df9e0be0e7e436ccc016bc6515e8e7
          Files :

          • changelog.html
          • core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #4099 [FIXED JENKINS-27218] (Revision 342dc735b0df9e0be0e7e436ccc016bc6515e8e7) Result = SUCCESS kohsuke : 342dc735b0df9e0be0e7e436ccc016bc6515e8e7 Files : changelog.html core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly

            Unassigned Unassigned
            ndeloof Nicolas De Loof
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: