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

          Nicolas De Loof created issue -
          Nicolas De Loof made changes -
          Description Original: `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-Hudson-JNLP-Port) that would be exposed by hudson/TcpSlaveAgentListener/index.jelly to reflect configured hudson.TcpSlaveAgentListener.hostName
          New: `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
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 161418 ] New: JNJira + In-Review [ 196755 ]

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

              Created:
              Updated:
              Resolved: