Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Mng http2-hpack jar causes connection to time out rather than throw an exception

Hi,

On Mon, Sep 4, 2023 at 9:50 PM Shawn Heisey via jetty-users
<jetty-users@xxxxxxxxxxx> wrote:
>
> Referring to this thread on the solr user mailing list:
>
> https://lists.apache.org/thread/y61xo5pqx5xhq4mz8okd2nmptz1drnl0
>
> This user was seeing timeouts when trying to use SolrJ's Http2SolrClient
> object in HTTP/2 mode.  Setting it to use http 1.1 made it work
> properly.  I built a test program that worked fine.
>
> By comparing my test program to their program, the user found that they
> were missing the http2-hpack jar.  Once they added it, the problem went
> away.

On the client, or on the server?

> Should this be reported as a bug?  I think that the program should have
> done one of two things as a result of the missing jar:
>
> * Throw an exception (maybe ClassNotFoundException), ideally stating
> that HPACK header compression is not possible because the implementation
> is missing.

We do throw an exception, although we can improve and be clearer.
Was logging for Jetty enabled?

> * Proceed without HPACK, logging a message at WARN about it.  This
> assumes that http2 CAN operate without hpack.

It cannot.

> If http2 requires hpack,
> then I think it should not be in a separate jar from the main http2
> implementation.  I read through the http2 RFC when it was first
> released, but I admit that I do not remember whether or not hpack was
> required.

It must be in a separate jar because both client and server use it,
and we don't want to ship a fat jar on the server with client classes
that won't be used and vice-versa.

As you point out, the Solr user should use a dependency management
tool -- it's 2023.

Not sure that we want to sprinkle checks in our code for dependencies
that should be there but are not.
We won't be able to cover all cases of missing jars (jetty-util,
jetty-io, jetty-http, etc.).

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top