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

Connection refused when running JNLP slave on Windows

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • core

      After upgrading Jenkins 1.609.3 -> 1.625.1 without upgrading any plugins when I tried to run the slave from the web page the JNLP started and failed with connection refused.

      I had to revert the upgrade and did not capture the exception logs. I will create a new testing Jenkins to recreate the problem and post more information later. This is incomplete post is to have an issue number to connect to the community feedback for the changelog as soon as possible.

      Reverse proxy is set up in following way (relevant part of configuration with server name replaced):

      ProxyRequests Off
      ProxyPreserveHost On
      AllowEncodedSlashes NoDecode

      ProxyPass /jenkins http://my.host.cz:8080/jenkins nocanon
      ProxyPassReverse /jenkins http://my.host.cz:8080/jenkins

      Substitute "s|http://my.host.cz:8080/jenkins|/jenkins|iq"
      SetOutputFilter INFLATE;SUBSTITUTE;DEFLATE

      <LocationMatch "^/jenkins(?:/static/|/cli/|/git/|/jnlpJars/).*$">
      AuthType None
      </LocationMatch>

      <LocationMatch "^/jenkins(??!/static/|/cli/|/git/|/jnlpJars/).)*$">

      AuthName "Jenkins NTLM - Login using your DOMAIN username and password"
      AuthType SSPI
      SSPIAuth On
      SSPIAuthoritative On
      require valid-user

      RequestHeader unset X-Forwarded-User
      RewriteEngine On
      RewriteCond %

      Unknown macro: {LA-U}

      (.+)
      RewriteRule .* - [E=RU:%1,NS]
      RequestHeader set X-Forwarded-User %

      Unknown macro: {RU}

      e
      </LocationMatch>

          [JENKINS-31022] Connection refused when running JNLP slave on Windows

          After creating the test Jenkins environment and carefully going through all settings in Tomcat, Apache proxy and Jenkins I found out that the culprit was NOT the upgrade, but a simultaneous change to the proxying.

          Since we use NTLM authentication for Jenkins and the slaves could not connect there I tried adding the problematic path (tcpSlaveListener) to location without authentication (in addition to static, cli, git and jnlpJars) and all the web page options started working (button, javaws and java -jar).

          Michael Štědrý added a comment - After creating the test Jenkins environment and carefully going through all settings in Tomcat, Apache proxy and Jenkins I found out that the culprit was NOT the upgrade, but a simultaneous change to the proxying. Since we use NTLM authentication for Jenkins and the slaves could not connect there I tried adding the problematic path (tcpSlaveListener) to location without authentication (in addition to static, cli, git and jnlpJars) and all the web page options started working (button, javaws and java -jar).

          Bad proxy configuration.

          Michael Štědrý added a comment - Bad proxy configuration.

            Unassigned Unassigned
            vaskrist Michael Štědrý
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: