druid icon indicating copy to clipboard operation
druid copied to clipboard

Druid 0.13.0 - Warning on Historicals "Not all bytes were read from the S3ObjectInputStream"

Open Stephan3555 opened this issue 7 years ago • 18 comments

Hello guys,

since our migration from Druid 0.12.3 to 0.13.0 the Historicals consistently throwing following warnings:

2019-01-23T12:45:06,949 WARN [ZkCoordinator] com.amazonaws.services.s3.internal.S3AbortableInputStream - Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input stream after use.

Is this something I have to be concerned? Because the cluster seems to work anyway.

Could be related to this: https://github.com/aws/aws-sdk-java/issues/1211

Stephan3555 avatar Jan 23 '19 13:01 Stephan3555

interesting. I see the same thing on my middlemanagers. No idea yet why and how to overcome... Thanks for creating the ticket about it.

sascha-coenen avatar Jan 25 '19 11:01 sascha-coenen

I am also seeing this warning in my historical logs. Although, there has been no problem in the druid cluster so far.

Please let us know, if any update on the same.

Thanks!

divyad1508 avatar Apr 24 '19 12:04 divyad1508

We skipped version 0.13.0 and went straight to 0.14.0. The Problem seems to be resolved in this version

Stephan3555 avatar Apr 30 '19 11:04 Stephan3555

Nope, still occurs in Druid 0.14.0

2019-05-07T13:55:18,998 WARN [ZkCoordinator] com.amazonaws.services.s3.internal.S3AbortableInputStream - Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input stream after use.

Anyone experience this as well?

Stephan3555 avatar May 07 '19 14:05 Stephan3555

I've seen it too. Looking at the source of S3AbortableInputStream, this happens when a stream is closed without all bytes being read. I'm not sure what the cause might be. Maybe something in S3DataSegmentPuller that isn't fully reading the stream?

gianm avatar May 07 '19 17:05 gianm

We are currently running 0.14.2-incubating and noticed the same thing on the Historical nodes when swapping out the servers. Once the Historical servers had finished loading the data back into the cluster and the load queues were empty, the log lines stopped and all appeared to go back to normal.

WARN [ZkCoordinator] com.amazonaws.services.s3.internal.S3AbortableInputStream - Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input stream after use.

trevortitlestad avatar Aug 07 '19 10:08 trevortitlestad

We are seeing this same thing on version 0.16.0

mlubavin-vg avatar Nov 18 '19 21:11 mlubavin-vg

We are seeing this same thing on version 0.16.0 we see it too. its still happening in 0.16.0

sascha-coenen avatar Nov 20 '19 01:11 sascha-coenen

I see it in 0.17.0 on historicals.

smokemonster99 avatar Apr 04 '20 16:04 smokemonster99

I see it also in 0.18.1.

sh-homelab avatar Jun 11 '20 07:06 sh-homelab

Same here updating from 0.12.1 to 0.18.1

josh-pritchard-fcx avatar Jun 19 '20 20:06 josh-pritchard-fcx

Got this error from the middleManagers on 0.19.0-rc1

dbrojas avatar Jul 21 '20 14:07 dbrojas

I learned a lot about the ZIP format today 🙂

I did a little testing and I suspect this is due to the fact that ZipInputStream, which is used through CompressionUtils.unzip when pulling segment files, does not read the central directory at the end of zip files. It only reads the local file headers and local file data. (See https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html.) It closes the file when it first encounters the central directory, rather than reading the whole thing.

I think this is OK, because Druid itself is writing these zip files, and it isn't using any of the zip features (file replacement, deletion) that would require usage of the central directory. That means these messages are harmless, but they are annoying. We should be able to get rid of them by modifying CompressionUtils.unzip to read the rest of the stream after unzipping is done.

We should also implement a non-streaming version of CompressionUtils.unzip that is used in situations where Druid itself didn't write the zip file. In these situations, it's important to read the central directory.

gianm avatar Dec 08 '20 21:12 gianm

#10664 should fix this.

gianm avatar Dec 10 '20 00:12 gianm

I unfortunately still sees this on 0.22.1 inside our Overlord logs.

2022-06-13T04:12:20,143 WARN [qtp50359291-654] com.amazonaws.services.s3.internal.S3AbortableInputStream - Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input stream after use.

didip avatar Jun 13 '22 04:06 didip

Hi, I am using Druid 25.0.0, and I see this problem too: " com.amazonaws.services.s3.internal.S3AbortableInputStream - Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input stream after use. "

abinashk-inf avatar Jul 19 '23 07:07 abinashk-inf

we also see this warning as well by using druid 0.20.1

SmaatoDataTeam avatar Aug 07 '23 19:08 SmaatoDataTeam

We also see this on Druid 27.0.0

spliakos avatar Apr 29 '24 09:04 spliakos