Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2255

503 response in ProxyHandler when backend supports HTTP/2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.25.Final, 2.3.7.Final
    • 2.3.5.Final
    • None
    • None

      When using the ProxyHandler and LoadBalancingProxyClient to send a request to a backend HTTP server that supports HTTP/2 the server responds with a 503 instead of routing the request.

      I've written an SSCCE here: https://github.com/codemonstur/loadbalancer-bug

      When line 38 is commented out (i.e. HTTP/2 is not enabled on the backend) the request succeeds normally and I get the "Hello, world!" message. When the line is left in I see this error:

      Apr 02, 2023 4:40:05 PM io.undertow.server.handlers.proxy.ProxyHandler handleFailure
      ERROR: UT005028: Proxy request to / failed
      java.nio.channels.ClosedChannelException
          at io.undertow.client.http2.Http2ClientConnection.close(Http2ClientConnection.java:306)
          at org.xnio.IoUtils.safeClose(IoUtils.java:152)
          at io.undertow.client.http2.Http2ClientConnection$Http2ReceiveListener.handleEvent(Http2ClientConnection.java:490)
          at io.undertow.client.http2.Http2ClientConnection$Http2ReceiveListener.handleEvent(Http2ClientConnection.java:387)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
          at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:959)
          at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:939)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
          at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener$1.run(AbstractFramedChannel.java:971)
          at io.undertow.server.protocol.framed.AbstractFramedChannel$1.run(AbstractFramedChannel.java:144)
          at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
          at org.xnio.nio.WorkerThread.run(WorkerThread.java:479) 

            flaviarnn Flavia Rainone
            codemonstur Jurgen Voorneveld (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: