hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Boorshtein <mboorsht...@gmail.com>
Subject Odd timing issue with Prometheus node exporter
Date Wed, 03 Jan 2018 16:54:34 GMT
I'm seeing a very odd issue with the Prometheus node exporter.  When making
a call from http client I get the following exception:



org.apache.http.ConnectionClosedException: Premature end of
Content-Length delimited message body (expected: 14441; received: 0

        at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:140)
~[httpcore-4.4.8.jar:4.4.8]

        at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:118)
~[httpclient-4.5.4.jar:4.5.4]

        at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:59)
~[?:1.8.0_151]

        at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:266)
~[?:1.8.0_151]

        at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:258)
~[?:1.8.0_151]

        at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
~[?:1.8.0_151]

        at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
~[?:1.8.0_151]

        at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)
~[?:1.8.0_151]

        at org.apache.http.client.entity.GZIPInputStreamFactory.create(GZIPInputStreamFactory.java:61)
~[httpclient-4.5.4.jar:4.5.4]

        at org.apache.http.client.entity.LazyDecompressingInputStream.initWrapper(LazyDecompressingInputStream.java:51)
~[httpclient-4.5.4.jar:4.5.4]

        at org.apache.http.client.entity.LazyDecompressingInputStream.read(LazyDecompressingInputStream.java:63)
~[httpclient-4.5.4.jar:4.5.4]

        at com.tremolosecurity.proxy.ConfigSys.procData(ConfigSys.java:446)
[unison-server-core-1.0.12.jar:?]


Here's the response headers from node exporter:
< HTTP/1.1 200 OK
< Content-Length: 135393
< Content-Type: text/plain; version=0.0.4
< Date: Wed, 03 Jan 2018 15:53:02 GMT
<
{ [69439 bytes data]

So there are two odd issues here:

1.  Why is the gzip decoder being used when there's no encoding response
header?
2.  What is generating the exception?

Here's the really odd part, if I attach a debugger, in the time it takes
for me to get from when I execute the HttpGet until I get to where this
exception gets generated then everything works great.  So it seems like a
timing issue?  I tried to tell the HttpClient to ignore compression, but I
get a similar error just without the GZip decoder.

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message