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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      `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

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

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

          Show
          danielbeck Daniel Beck added a comment - Isn't this covered by the Advanced 'Tunnel Options' (or similar) of JNLP slaves?
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          dogfood 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
          Show
          dogfood 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

            People

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

              Dates

              Created:
              Updated:
              Resolved: