On Wed, 2017-10-25 at 11:12 -0400, Marc Boorshtein wrote: > All, > > I'm trying to connect to a resource over https and am getting the > following > errors on occasion: > > org.apache.http.ConnectionClosedException: Premature end of chunk > coded > message body: closing chunk expected > at > org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputS > tream.java:268) > ~[httpcore-4.4.4.jar:4.4.4] > at > org.apache.http.impl.io.ChunkedInputStream.nextChunk(ChunkedInputStre > am.java:227) > ~[httpcore-4.4.4.jar:4.4.4] > at > org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.ja > va:186) > ~[httpcore-4.4.4.jar:4.4.4] > at > org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.j > ava:137) > ~[httpclient-4.5.2.jar:4.5.2] > > There isn't much on the web on this one. Whats interesting is that > when > this code runs in the same subnet as the target, no issues but when > it > crosses some complex networking I will get this error on > occasion. My > network team is saying there are no "issues" with the > connections. Are > there some tuning parameters I can adjust for this? >
You should try to capture a wire log of the message exchange that exhibits the problem and see whether or not the closing chunk is indeed missing. Besides, it should be pretty safe to just ignore ConnectionClosedException if you do not care about 100% HTTP protocol compliance. HttpClient intentionally uses a specific exception type so it could be caught and ignored if desired. Hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
