[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] EXTERNAL: Re: jetty client delivers incomplete response without exception?
|
Hi,
On Tue, Apr 19, 2022 at 9:08 AM Robben, Bert <Bert.Robben@xxxxxxxxxxxxx> wrote:
>
> Hi,
>
> I know that the response was incomplete because the test expects a certain amount of bytes (it knows this because it knows what the server should be returning) and it gets only a fraction of the expected amount. In other words, the client received some response, but only a part of it.
>
> This looks to be very much a race condition. This test is part of our daily build so it runs a lot. But this particular failure I've seen only once so far. So I'm afraid I cannot reproduce.
>
> How does the http client know that more data is supposed to come? I can understand that it detects that the connection is closed, but how can it make a difference between "this is it, you got your complete response" and "there is a problem, server needed to send more stuff but there was for some reason a connection issue"?
>
The client knows how many bytes from the `Content-Length` header; if
it sees less, it produces an EOF exception.
If the content is chunked, it expects the terminating chunk; if it
does not see it, it produces an EOF exception.
So yes could be a Jetty bug, or an application bug (e.g. your
application expects just one chunk of content, but when it receives 2
it loses one), that's why we would need some evidence in the form of
DEBUG logs.
> We do run in k8s, so there are some hops (k8s services) in between the jetty client and the jetty web server. I have no idea if these can also play a role here.
It could. We don't have a particularly good experience with k8s,
although it seems more stable with TCP than with UDP.
Again, no way to tell unless there is evidence (although this would
require network traces to be sure).
--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.