When running queries against a druid cluster I start getting failures

Hi, i am using avatica jdbc client to query a druid cluster and i get these errors: Does anyone know how to solve this?

org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL “select sum(“count”), TIME_FORMAT(__time, ‘YYYYMMdd’) as “day_ts”, TIME_EXTRACT(__time, ‘HOUR’) as “hour_ts”, URI, ACTION_NATURAL_NAME from “user_action_cluster_cassandra2” group by TIME_FORMAT(__time, ‘YYYYMMdd’), TIME_EXTRACT(__time, ‘HOUR’), URI, ACTION_NATURAL_NAME order by TIME_FORMAT(__time, ‘YYYYMMdd’),TIME_EXTRACT(__time, ‘HOUR’), URI, ACTION_NATURAL_NAME limit 100”: Remote driver error: RuntimeException: org.apache.druid.java.util.common.RE: Failure getting results for query[051a1954-6756-4733-93a9-6dadc816e44c] url[http://34.251.217.167:8083/druid/v2/] because of [org.jboss.netty.channel.ChannelException: Channel disconnected] -> RE: Failure getting results for query[051a1954-6756-4733-93a9-6dadc816e44c] url[http://34.251.217.167:8083/druid/v2/] because of [org.jboss.netty.channel.ChannelException: Channel disconnected] -> ExecutionException: org.jboss.netty.channel.ChannelException: Channel disconnected -> ChannelException: Channel disconnected

at org.apache.calcite.avatica.Helper.createException(Helper.java:54)

at org.apache.calcite.avatica.Helper.createException(Helper.java:41)

at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:163)

at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:227)

at SqlClient.measureSqlDuration(SqlClient.java:130)

at SqlClient.testSqls(SqlClient.java:181)

at TestRunner.runTest(TestRunner.java:54)

at TestRunner.main(TestRunner.java:146)

java.lang.RuntimeException: org.apache.druid.java.util.common.RE: Failure getting results for query[051a1954-6756-4733-93a9-6dadc816e44c] url[http://…/druid/v2/] because of [org.jboss.netty.channel.ChannelException: Channel disconnected]

at org.apache.druid.sql.avatica.DruidStatement.execute(DruidStatement.java:209)

at org.apache.druid.sql.avatica.DruidMeta.prepareAndExecute(DruidMeta.java:191)

at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:206)

at org.apache.calcite.avatica.remote.Service$PrepareAndExecuteRequest.accept(Service.java:927)

at org.apache.calcite.avatica.remote.Service$PrepareAndExecuteRequest.accept(Service.java:879)

at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:94)

at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:52)

at org.apache.calcite.avatica.server.AvaticaJsonHandler.handle(AvaticaJsonHandler.java:130)

at org.apache.druid.sql.avatica.DruidAvaticaHandler.handle(DruidAvaticaHandler.java:59)

at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:61)

at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)

at org.eclipse.jetty.server.Server.handle(Server.java:531)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:760)

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:678)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.apache.druid.java.util.common.RE: Failure getting results for query[051a1954-6756-4733-93a9-6dadc816e44c] url[…] because of [org.jboss.netty.channel.ChannelException: Channel disconnected]

at org.apache.druid.client.JsonParserIterator.init(JsonParserIterator.java:155)

at org.apache.druid.client.JsonParserIterator.hasNext(JsonParserIterator.java:79)

at org.apache.druid.java.util.common.guava.BaseSequence.makeYielder(BaseSequence.java:89)

at org.apache.druid.java.util.common.guava.BaseSequence.toYielder(BaseSequence.java:69)

at org.apache.druid.java.util.common.guava.MappedSequence.toYielder(MappedSequence.java:49)

at org.apache.druid.java.util.common.guava.MergeSequence.lambda$toYielder$1(MergeSequence.java:64)

at org.apache.druid.java.util.common.guava.MappingAccumulator.accumulate(MappingAccumulator.java:40)

at org.apache.druid.java.util.common.guava.BaseSequence.accumulate(BaseSequence.java:44)

at org.apache.druid.java.util.common.guava.MappedSequence.accumulate(MappedSequence.java:43)

at org.apache.druid.java.util.common.guava.MergeSequence.toYielder(MergeSequence.java:61)

at org.apache.druid.java.util.common.guava.LazySequence.toYielder(LazySequence.java:46)

at org.apache.druid.query.RetryQueryRunner$1.toYielder(RetryQueryRunner.java:97)

at org.apache.druid.common.guava.CombiningSequence.toYielder(CombiningSequence.java:79)

at org.apache.druid.java.util.common.guava.LimitedSequence.toYielder(LimitedSequence.java:53)

at org.apache.druid.java.util.common.guava.WrappingSequence$2.get(WrappingSequence.java:88)

at org.apache.druid.java.util.common.guava.WrappingSequence$2.get(WrappingSequence.java:84)

at org.apache.druid.java.util.common.guava.SequenceWrapper.wrap(SequenceWrapper.java:55)

at org.apache.druid.java.util.common.guava.WrappingSequence.toYielder(WrappingSequence.java:83)

at org.apache.druid.java.util.common.guava.MappedSequence.toYielder(MappedSequence.java:49)

at org.apache.druid.java.util.common.guava.WrappingSequence$2.get(WrappingSequence.java:88)

at org.apache.druid.java.util.common.guava.WrappingSequence$2.get(WrappingSequence.java:84)

at org.apache.druid.query.CPUTimeMetricQueryRunner$1.wrap(CPUTimeMetricQueryRunner.java:74)

at org.apache.druid.java.util.common.guava.WrappingSequence.toYielder(WrappingSequence.java:83)

at org.apache.druid.java.util.common.guava.WrappingSequence$2.get(WrappingSequence.java:88)

at org.apache.druid.java.util.common.guava.WrappingSequence$2.get(WrappingSequence.java:84)

at org.apache.druid.java.util.common.guava.SequenceWrapper.wrap(SequenceWrapper.java:55)

at org.apache.druid.java.util.common.guava.WrappingSequence.toYielder(WrappingSequence.java:83)

at org.apache.druid.java.util.common.guava.MappedSequence.toYielder(MappedSequence.java:49)

at org.apache.druid.java.util.common.guava.Yielders.each(Yielders.java:32)

at org.apache.druid.sql.avatica.DruidStatement.execute(DruidStatement.java:198)

… 25 more

Suppressed: java.lang.IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads. If it is needed to gather dimension or metric information from multiple threads or from an async thread, this information should explicitly be passed between threads (e. g. using Futures), or this DefaultQueryMetrics’s ownerThread should be reassigned explicitly

at org.apache.druid.query.DefaultQueryMetrics.checkModifiedFromOwnerThread(DefaultQueryMetrics.java:51)

at org.apache.druid.query.DefaultQueryMetrics.reportMetric(DefaultQueryMetrics.java:264)

at org.apache.druid.query.DefaultQueryMetrics.reportCpuTime(DefaultQueryMetrics.java:235)

at org.apache.druid.query.CPUTimeMetricQueryRunner$1.after(CPUTimeMetricQueryRunner.java:88)

at org.apache.druid.java.util.common.guava.WrappingSequence.toYielder(WrappingSequence.java:95)

… 32 more

Caused by: java.util.concurrent.ExecutionException: org.jboss.netty.channel.ChannelException: Channel disconnected

at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)

at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)

at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)

at org.apache.druid.client.JsonParserIterator.init(JsonParserIterator.java:117)

… 54 more

Caused by: org.jboss.netty.channel.ChannelException: Channel disconnected

at org.apache.druid.java.util.http.client.NettyHttpClient$1.channelDisconnected(NettyHttpClient.java:351)

at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)

at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

at org.jboss.netty.channel.SimpleChannelUpstreamHandler.channelDisconnected(SimpleChannelUpstreamHandler.java:208)

at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)

at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

at org.jboss.netty.channel.SimpleChannelUpstreamHandler.channelDisconnected(SimpleChannelUpstreamHandler.java:208)

at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)

at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)

at org.jboss.netty.handler.codec.replay.ReplayingDecoder.cleanup(ReplayingDecoder.java:570)

at org.jboss.netty.handler.codec.frame.FrameDecoder.channelDisconnected(FrameDecoder.java:365)

at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:102)

at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:92)

at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)

at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:396)

at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:360)

at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93)

at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)

at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)