-
Bug
-
Resolution: Done
-
Major
-
7.1.0.DR14
-
None
Setup EAP with Elytron, utilizing TLSv1.1 or older. Then set 'wrap' attribute of 'server-ssl-context' to false and perform HTTPS request that offers also h2 protocol to server. There is ERR_EMPTY_RESPONSE error from Chrome or curl: (52) Empty reply from server from curl. When I set DEBUG logging level, I can see following log messages after curl command
curl -v -k https://localhost:8443
17:43:17,017 DEBUG [io.undertow.request.io] (default I/O-2) Marking reads broken on channel Http2Channel peer /127.0.0.1:60660 local 0.0.0.0/0.0.0.0:8443[ No Receiver [] -- [] -- []]: java.nio.channels.ClosedChannelException at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:816) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,017 DEBUG [io.undertow.request] (default I/O-2) Closing HTTP2 channel to /127.0.0.1:60660 due to broken read side: java.io.IOException: UT000104: Incorrect HTTP2 preface at io.undertow.protocols.http2.Http2Channel.parseFrame(Http2Channel.java:520) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:427) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,017 DEBUG [io.undertow.request.io] (default I/O-2) Sending goaway on channel Http2Channel peer /127.0.0.1:60660 local 0.0.0.0/0.0.0.0:8443[ No Receiver [] -- [] -- []]: java.nio.channels.ClosedChannelException at io.undertow.protocols.http2.Http2Channel.sendGoAway(Http2Channel.java:753) at io.undertow.protocols.http2.Http2Channel.handleBrokenSourceChannel(Http2Channel.java:593) at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:825) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,017 DEBUG [io.undertow.request.io] (default I/O-2) Marking writes broken on channel Http2Channel peer /127.0.0.1:60660 local 0.0.0.0/0.0.0.0:8443[ No Receiver [io.undertow.protocols.http2.Http2GoAwayStreamSinkChannel@785be4eb] -- [] -- []]: java.nio.channels.ClosedChannelException at io.undertow.server.protocol.framed.AbstractFramedChannel.markWritesBroken(AbstractFramedChannel.java:852) at io.undertow.server.protocol.framed.AbstractFramedChannel.flushSenders(AbstractFramedChannel.java:670) at io.undertow.server.protocol.framed.AbstractFramedChannel.flush(AbstractFramedChannel.java:717) at io.undertow.server.protocol.framed.AbstractFramedChannel.queueFrame(AbstractFramedChannel.java:710) at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.queueFinalFrame(AbstractFramedStreamSinkChannel.java:252) at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.shutdownWrites(AbstractFramedStreamSinkChannel.java:237) at io.undertow.protocols.http2.Http2Channel.sendGoAway(Http2Channel.java:757) at io.undertow.protocols.http2.Http2Channel.handleBrokenSourceChannel(Http2Channel.java:593) at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:825) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,018 DEBUG [io.undertow.request] (default I/O-2) Closing HTTP2 channel to /127.0.0.1:60660 due to broken write side: java.nio.channels.ClosedChannelException at io.undertow.protocols.ssl.SslConduit.write(SslConduit.java:377) at io.undertow.conduits.IdleTimeoutConduit.write(IdleTimeoutConduit.java:130) at org.xnio.conduits.ConduitStreamSinkChannel.write(ConduitStreamSinkChannel.java:154) at io.undertow.server.protocol.framed.AbstractFramedChannel.flushSenders(AbstractFramedChannel.java:636) at io.undertow.server.protocol.framed.AbstractFramedChannel.flush(AbstractFramedChannel.java:717) at io.undertow.server.protocol.framed.AbstractFramedChannel.queueFrame(AbstractFramedChannel.java:710) at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.queueFinalFrame(AbstractFramedStreamSinkChannel.java:252) at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.shutdownWrites(AbstractFramedStreamSinkChannel.java:237) at io.undertow.protocols.http2.Http2Channel.sendGoAway(Http2Channel.java:757) at io.undertow.protocols.http2.Http2Channel.handleBrokenSourceChannel(Http2Channel.java:593) at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:825) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,018 DEBUG [io.undertow.request.io] (default I/O-2) Channel Http2Channel peer /127.0.0.1:60660 local 0.0.0.0/0.0.0.0:8443[ No Receiver [io.undertow.protocols.http2.Http2GoAwayStreamSinkChannel@785be4eb] -- [] -- []] is being closed: java.nio.channels.ClosedChannelException at io.undertow.server.protocol.framed.AbstractFramedChannel.close(AbstractFramedChannel.java:791) at org.xnio.IoUtils.safeClose(IoUtils.java:152) at io.undertow.protocols.http2.Http2Channel.handleBrokenSinkChannel(Http2Channel.java:602) at io.undertow.server.protocol.framed.AbstractFramedChannel.markWritesBroken(AbstractFramedChannel.java:854) at io.undertow.server.protocol.framed.AbstractFramedChannel.flushSenders(AbstractFramedChannel.java:670) at io.undertow.server.protocol.framed.AbstractFramedChannel.flush(AbstractFramedChannel.java:717) at io.undertow.server.protocol.framed.AbstractFramedChannel.queueFrame(AbstractFramedChannel.java:710) at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.queueFinalFrame(AbstractFramedStreamSinkChannel.java:252) at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.shutdownWrites(AbstractFramedStreamSinkChannel.java:237) at io.undertow.protocols.http2.Http2Channel.sendGoAway(Http2Channel.java:757) at io.undertow.protocols.http2.Http2Channel.handleBrokenSourceChannel(Http2Channel.java:593) at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:825) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,018 DEBUG [io.undertow.request] (default I/O-2) Closing HTTP2 channel to /127.0.0.1:60660 due to broken write side: java.nio.channels.ClosedChannelException at io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel.flush(AbstractFramedStreamSinkChannel.java:341) at io.undertow.protocols.http2.Http2Channel.sendGoAway(Http2Channel.java:758) at io.undertow.protocols.http2.Http2Channel.handleBrokenSourceChannel(Http2Channel.java:593) at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:825) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,018 DEBUG [io.undertow.request.io] (default I/O-2) Channel Http2Channel peer /127.0.0.1:60660 local 0.0.0.0/0.0.0.0:8443[ No Receiver [] -- [] -- []] is being closed: java.nio.channels.ClosedChannelException at io.undertow.server.protocol.framed.AbstractFramedChannel.close(AbstractFramedChannel.java:791) at org.xnio.IoUtils.safeClose(IoUtils.java:152) at io.undertow.protocols.http2.Http2Channel.handleBrokenSinkChannel(Http2Channel.java:602) at io.undertow.protocols.http2.Http2Channel$Http2ControlMessageExceptionHandler.handleException(Http2Channel.java:1038) at io.undertow.protocols.http2.Http2Channel$Http2ControlMessageExceptionHandler.handleException(Http2Channel.java:1034) at io.undertow.protocols.http2.Http2Channel.sendGoAway(Http2Channel.java:770) at io.undertow.protocols.http2.Http2Channel.handleBrokenSourceChannel(Http2Channel.java:593) at io.undertow.server.protocol.framed.AbstractFramedChannel.markReadsBroken(AbstractFramedChannel.java:825) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:474) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,018 DEBUG [io.undertow.request.io] (default I/O-2) UT005013: An IOException occurred: java.io.IOException: UT000104: Incorrect HTTP2 preface at io.undertow.protocols.http2.Http2Channel.parseFrame(Http2Channel.java:520) at io.undertow.server.protocol.framed.AbstractFramedChannel.receive(AbstractFramedChannel.java:427) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:106) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567) 17:43:17,018 DEBUG [io.undertow.request.io] (default I/O-2) Channel Http2Channel peer /127.0.0.1:60660 local 0.0.0.0/0.0.0.0:8443[ No Receiver [] -- [] -- []] is being closed: java.nio.channels.ClosedChannelException at io.undertow.server.protocol.framed.AbstractFramedChannel.close(AbstractFramedChannel.java:791) at org.xnio.IoUtils.safeClose(IoUtils.java:152) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:118) at io.undertow.server.protocol.http2.Http2ReceiveListener.handleEvent(Http2ReceiveListener.java:57) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:931) at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:912) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.readReady(SslConduit.java:1129) at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89) at org.xnio.nio.WorkerThread.run(WorkerThread.java:567)
When I perform request that does not offer h2 protocol, it seems ok and correct response is returned from the server:
curl -v --http1.1 -k https://localhost:8443
Also when 'wrap' attribute in 'server-ssl-context' is set to true, then all requests to server works just fine (this time also those that offers h2 protocol).
Probably server tries to utilize h2 protocol as client offered it but as TLSv1.1 or lower is configured this is sentenced to fail (h2 requires TLSv1.2 at least).
Expected behaviour: HTTPS request from client returns correct response even when 'wrap' attribute in 'server-ssl-context' is set to 'false' and TLSv1.1 or lower is utilized even when client offers h2 protocol to server in request.
- is cloned by
-
UNDERTOW-1027 Elytron + TLSv1.1 + wrap attribute to false results in empty reply from server
- Resolved
- relates to
-
JBEAP-5942 Elytron + https-listener in undertow listener doesn't work with enable-http2 set to "true"
- Closed