Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-20279

HTTP2 is not working with Oracle JDK8 u261

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.4.0.CD21
    • 7.3.3.CR2, 7.3.2.GA
    • Security, Undertow
    • None
    • False
    • False
    • This was resolved in WildFly 21 with a Elytron and Undertow upgrade.
    • Hide

      Info about JDK used:

      $ /home/jstourac/jdks/jdk1.8.0_261/bin/java -version
      java version "1.8.0_261"
      Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
      
      1. unzip the JBoss EAP
      2. start the server with proper JDK
        JAVA_HOME=/home/jstourac/jdks/jdk1.8.0_261 ./jboss-eap-7.3.1/bin/standalone.sh
        
      3. wait till server boots up and perform an HTTP request (note that curl with HTTP2 support has to be used, otherwise use different client)
        curl -k https://localhost:8443 -vvv >/dev/null
        
      4. see that HTTP/1.1 is used only; there is also this message in the output
        • ALPN, server did not agree to a protocol

      Now workaround:

      1. unzip the JBoss EAP
      2. start the server with proper JDK and property from UNDERTOW-1726
        JAVA_HOME=/home/jstourac/jdks/jdk1.8.0_261 ./jboss-eap-7.3.1/bin/standalone.sh -Dio.undertow.protocols.alpn.jdk8
        
      3. wait till server boots up and perform an HTTP request
        curl -k https://localhost:8443 -vvv >/dev/null
        
      4. see that HTTP/2 is used successfully now
      Show
      Info about JDK used: $ /home/jstourac/jdks/jdk1.8.0_261/bin/java -version java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode) unzip the JBoss EAP start the server with proper JDK JAVA_HOME=/home/jstourac/jdks/jdk1.8.0_261 ./jboss-eap-7.3.1/bin/standalone.sh wait till server boots up and perform an HTTP request (note that curl with HTTP2 support has to be used, otherwise use different client) curl -k https: //localhost:8443 -vvv >/dev/ null see that HTTP/1.1 is used only; there is also this message in the output ALPN, server did not agree to a protocol Now workaround: unzip the JBoss EAP start the server with proper JDK and property from UNDERTOW-1726 JAVA_HOME=/home/jstourac/jdks/jdk1.8.0_261 ./jboss-eap-7.3.1/bin/standalone.sh -Dio.undertow.protocols.alpn.jdk8 wait till server boots up and perform an HTTP request curl -k https: //localhost:8443 -vvv >/dev/ null see that HTTP/2 is used successfully now

      There seems to be some problem with HTTP2 support with new Oracle JDK8 u261 and JBoss EAP since 7.3.2.GA version. When request against server is executed, then HTTP2 is not established and communication remains via HTTP/1.1.

      There is no such issue when I use JBoss EAP 7.3.1.GA. Also, if I switch back to an older Oracle JDK8 u241, there is no such issue even with newer JBoss EAP versions. And also there is no issue when I use JBoss EAP 7.3.1.GA with Oracle JDK8 u261.

      This all seems to be tied with backport of ALPN support into the Oracle JDK8 recently and also work in following issue UNDERTOW-1726.

      There seems to be a workaround available - to define '-Dio.undertow.protocols.alpn.jdk8' during the server startup. With this property configured, the issue seems to disappear (as such, blocker priority of this may be discussed).

      What is the issue here:

      This is a change in default behavior of the server (HTTP2 not working with Oracle JDK8u261+ since JBoss EAP 7.3.2.GA). We should try to resolve this without default behavior change if possible. Only in case there is really no other solution, we need to document such thing. There is no note in our release notes for the 7.3.2 release. Just a reference to the JBEAP-19631 but with no actual explanation for its effect.

              flaviarnn Flavia Rainone
              jstourac@redhat.com Jan Stourac
              Jan Stourac Jan Stourac
              Jan Stourac Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: