Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Can jetty proxy servlet work with http2 correctly?

The jetty proxy servlet is definitely able to proxy http1 to h2 using our own client.  But I think the conversion work is mostly done by our client code.  So if you are replacing our client with grpc, then you are going to need to do the conversion yourself.   

On Thu, 23 Sept 2021 at 08:00, Eggie <eggchul1024@xxxxxxxxx> wrote:
Hi Joakim, 
Thank you for responding. I also found that link regarding to this issue before. However, when grpc server 1 talking to grpc server 2 there is no such issue. But for my usage, I need to use jetty sever as my main server(port) so I use the proxyservlet to proxy the request without just let those grpc servers talking directly. But seems the header is not correctly processed. So I want to ask if there is any similar usage cases? Or by any chance you might know how http2 and http1 conversation in both http version happens in proxyservlet?

Sincerely,
Danielle


On Sep 22, 2021, at 2:03 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:


I don't see Jetty involved in this description, or in the stacktrace.

But here, go follow the netty (different project then us) bug for this - https://github.com/grpc/grpc-java/issues/7953

Joakim Erdfelt / joakim@xxxxxxxxxxx


On Wed, Sep 22, 2021 at 2:35 PM Eggie <eggchul1024@xxxxxxxxx> wrote:
Hi Jetty-Dev@Eclipse,

I am currently working on a research and trying to connect a Jetty server with a grpc(base using netty). Currently having below error over the grace server.

grpc server1 -> Jetty (proxyservlet) -> grpc server2
java.lang.UnsupportedOperationException
        at io.grpc.netty.AbstractHttp2Headers.setLong(AbstractHttp2Headers.java:465)
        at io.grpc.netty.AbstractHttp2Headers.setLong(AbstractHttp2Headers.java:26)
        at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onHeadersRead(DefaultHttp2ConnectionDecoder.java:403)
        at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onHeadersRead(DefaultHttp2ConnectionDecoder.java:347)
        at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$PrefaceFrameListener.onHeadersRead(DefaultHttp2ConnectionDecoder.java:707)
        at io.netty.handler.codec.http2.Http2InboundFrameLogger$1.onHeadersRead(Http2InboundFrameLogger.java:56)

After couple attempts of debugging over the custom proxy servlet, I found that the request after being copied in AbstractProxyServlet it will be http1 request. So I want to ask if the proxyServlet will turn an http2 to http1 by default ? Will this be the cause of metadata damage or to the header? I have httpclient using http2 which turns the request back to http2.

Please let me know if anyone could help with this. And if possible, do you have any working example that a jetty server could talking to grpc server.

Thank you,

Danielle
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-dev


--

Back to the top