You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Marc Boorshtein <mb...@gmail.com> on 2018/01/03 16:54:34 UTC

Odd timing issue with Prometheus node exporter

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

Re: Odd timing issue with Prometheus node exporter

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2018-01-03 at 16:54 +0000, Marc Boorshtein wrote:
> I'm seeing a very odd issue with the Prometheus node exporter.  When
> making
> a call from http client I get the following exception:
> 
> 

Please post a complete wire log of the session

http://hc.apache.org/httpcomponents-client-4.5.x/logging.html

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org