[undertow-dev] HTTP/2 with undertow-core 1.2.6.Final?

Michael Hixson michael.hixson at gmail.com
Thu May 28 02:33:47 EDT 2015


Yes, that was it.  Thanks Radim!

-Michael

On Wed, May 27, 2015 at 11:17 PM, Radim Hatlapatka <rhatlapa at redhat.com> wrote:
> Hi Michael,
>
> From what I read it seems to me that you just added the alpn as dependency
> but not added it to -Xbootclasspath/p => there should be something like
> -Xbootclasspath/p:${HOME}/.m2/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.3.v20150130/alpn-boot-8.1.3.v20150130.jar
>
> Hope that helps.
>
> Radim
>
>
> On 05/28/2015 07:18 AM, Michael Hixson wrote:
>>
>> The demo works perfectly for me locally - I see "h2" as the protocol.
>> I copy and paste the code from Http2Server.java into my own project,
>> run it, and I'm back to "http/1.1".  There has got to be something
>> going on in the pom's (or resource files or something) of the Undertow
>> example that I'm not seeing.
>>
>> In any case I think it's pretty clear now that I'm screwing something
>> up.  I'll keep at it.
>>
>> -Michael
>>
>> On Wed, May 27, 2015 at 9:22 PM, Jason T. Greene
>> <jason.greene at redhat.com> wrote:
>>>
>>> Hi Michael,
>>>
>>> Could you also try running our demo directly?
>>>
>>> Instructions are on our http2 test cloud instance:
>>> http2.undertow.io
>>>
>>>
>>>> On May 27, 2015, at 9:21 PM, Michael Hixson <michael.hixson at gmail.com>
>>>> wrote:
>>>>
>>>> Hi Jason,
>>>>
>>>> I think so.
>>>>
>>>>   $ java -version
>>>>   java version "1.8.0_45"
>>>>   Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
>>>>   Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
>>>>
>>>> I just remembered I also installed the JCE Unlimited Strength thing.
>>>> Not sure if that would interfere.
>>>>
>>>> http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
>>>>
>>>> I'll retry with a fresh JDK.  Since you confirmed it's supposed to
>>>> work, I'll also try to come up with minimal shareable code that's not
>>>> working for me.
>>>>
>>>> -Michael
>>>>
>>>> On Wed, May 27, 2015 at 6:54 PM, Jason T. Greene
>>>> <jason.greene at redhat.com> wrote:
>>>>>
>>>>> Are you using the latest Java 8 runtime? Http2 clients will reject old
>>>>> ciphers (Java 7) and that version of the  alpn hack is only compatible with
>>>>> Java 8 releases after January.
>>>>>
>>>>> A self signed cert should be fine as long as you add the exception in
>>>>> the browser.
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>> On May 27, 2015, at 8:43 PM, Michael Hixson <michael.hixson at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I'm trying to test out HTTP/2 with undertow-core 1.2.6.Final.  I
>>>>>> haven't been able to see any HTTP/2 traffic to from my server locally,
>>>>>> and I'm not sure what I'm doing wrong.
>>>>>>
>>>>>> I mostly followed the example code here:
>>>>>>
>>>>>> https://github.com/undertow-io/undertow/blob/master/examples/src/main/java/io/undertow/examples/http2/Http2Server.java
>>>>>>
>>>>>> Notably I:
>>>>>> - Enable the HTTP2 and SPDY server options on my Undertow builder.
>>>>>> - Am using an HTTPS listener with an SSLContext.
>>>>>> - Have a maven dependency for
>>>>>> org.mortbay.jetty.alpn:alpn-boot:8.1.3v20150130.
>>>>>>
>>>>>> But when I make requests in a browser (tried Chrome and Firefox), it
>>>>>> says the protocol for all my requests is HTTP/1.1.  I know at least
>>>>>> Chrome supports HTTP2 because I can see it using HTTP2 in that very
>>>>>> same browser console - other resources loaded by that same page on my
>>>>>> website (e.g. to Google Analytics) are delivered *not* over HTTP/1.1.
>>>>>>
>>>>>> Has anyone been able to use HTTP/2 with Undertow on localhost
>>>>>> successfully?  Any ideas what I might be doing wrong?
>>>>>>
>>>>>> I'm using a self-signed certificate, if that matters.  I also tried
>>>>>> the keystores in the examples directory on Github and got the same
>>>>>> result.  Thinking something else in my app was interfering with this,
>>>>>> I also tried a root HttpHandler that simply wrote "hello" to the
>>>>>> output stream for every response.  No success there either.
>>>>>>
>>>>>> My apologies if this is me not understanding HTTP/2 rather than any
>>>>>> Undertow-specific thing.
>>>>>>
>>>>>> -Michael
>>>>>> _______________________________________________
>>>>>> undertow-dev mailing list
>>>>>> undertow-dev at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/undertow-dev
>>
>> _______________________________________________
>> undertow-dev mailing list
>> undertow-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
>


More information about the undertow-dev mailing list