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

Slave failed to connect to http/2 Master

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core, remoting
    • None
    • Platform: Windows Server 2012 R2
      Java: 1.8.0_161
      Jenkins 2.107.3

      Hello,

      My problem is that jenkins Slave is not able to connect when using http2/ on the host. I followed the instructions at: link Jenkins Help and added

       

      -Xbootclasspath/p:alpn-boot-8.1.11.v20170118.jar

      to the java prompt in jenkins.xml. }}{{

       

      This is how the arguments section in jenkins.xml looks like

       
      -Xrs -Xmx4G -Xms3G  -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Xbootclasspath/p:"P:\Programs\Jenkins\alpn-boot-8.1.12.v20180117.jar" -jar "%BASE%\jenkins.war" --httpPort=-1 --http2Port=443 --httpsKeyStore="P:\Programs\Jenkins\SERVER_KEYSTORE.jks" --httpsKeepAliveTimeout=30000 --httpsKeyStorePassword=3WT46jvzPrcpFUoTUXow --webroot="%BASE%\war"
       

      The Slave is not seen by the master, so the node is offline. I found the following in the error log of the slave

       

      Failing to obtain https://SERVER_NAME/computer/TagNode/slave-agent.jnlp?encrypt=true
      java.io.IOException: Invalid Http response
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
          at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
          at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:491)
          at hudson.remoting.Launcher.run(Launcher.java:314)
          at hudson.remoting.Launcher.main(Launcher.java:275)
      Caused by: java.io.IOException: Invalid Http response
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
          at java.net.HttpURLConnection.getResponseCode(Unknown Source)
          at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
          at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:481)
          ... 2 more
      

      After googleing around it seems that the Slave, or the jnlp startet via Java Webstart is not able to handle http/2 connections.

       

      How can i configure Jenkins to use http/2 at Port 443 and have a Slave accessing the Master?

       

      Thanks in advance.

       

            Unassigned Unassigned
            bstlwstl Sebastian
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: