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)

        at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:118)

        at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:59)

        at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:266)

        at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:258)

        at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)

        at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)

        at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:91)

        at org.apache.http.client.entity.GZIPInputStreamFactory.create(GZIPInputStreamFactory.java:61)

        at org.apache.http.client.entity.LazyDecompressingInputStream.initWrapper(LazyDecompressingInputStream.java:51)

        at org.apache.http.client.entity.LazyDecompressingInputStream.read(LazyDecompressingInputStream.java:63)

        at com.tremolosecurity.proxy.ConfigSys.procData(ConfigSys.java:446)

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
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.


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