Error connecting to dremio via JDBC driver from Spark scala

Dear Team,
I am facing one error while trying to create a table in dremio using JDBC driver, invoked via Spark.

I am trying to create a table. The query is visible for almost 3 minutes in the jobs link. But later reports that it was cancelled. Below is the error that I am seeing in the Spark job.

2018-09-24 05:27:28 INFO QueryResultHandler:763 - User Error Occurred [ErrorId: 6dcd6a47-4efb-4dce-8f54-60c98f9d2b2d]
cdjd.com.dremio.common.exceptions.UserException: Connection null <–> null (user client) closed unexpectedly. SabotNode down?
at cdjd.com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746)
at cdjd.com.dremio.sabot.rpc.user.QueryResultHandler$ChannelClosedHandler$1.operationComplete(QueryResultHandler.java:372)
at cdjd.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at cdjd.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504)
at cdjd.io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483)
at cdjd.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at cdjd.io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:103)
at cdjd.io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
at cdjd.io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1148)
at cdjd.io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:764)
at cdjd.io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:740)
at cdjd.io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:611)
at cdjd.io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1356)
at cdjd.io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624)
at cdjd.io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:608)
at cdjd.io.netty.channel.ChannelOutboundHandlerAdapter.close(ChannelOutboundHandlerAdapter.java:71)
at cdjd.io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624)
at cdjd.io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:608)
at cdjd.io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at cdjd.io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624)
at cdjd.io.netty.channel.AbstractChannelHandlerContext.access$1100(AbstractChannelHandlerContext.java:38)
at cdjd.io.netty.channel.AbstractChannelHandlerContext$13.run(AbstractChannelHandlerContext.java:613)
at cdjd.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at cdjd.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at cdjd.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
at cdjd.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at java.lang.Thread.run(Thread.java:745)
2018-09-24 05:27:28 INFO DremioCursor$ResultsListener:171 - [#2] Query failed:
cdjd.com.dremio.common.exceptions.UserException: Connection null <–> null (user client) closed unexpectedly. SabotNode down?
at cdjd.com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746)
at cdjd.com.dremio.sabot.rpc.user.QueryResultHandler$ChannelClosedHandler$1.operationComplete(QueryResultHandler.java:372)

But when I try to execute this using spark-shell via dremio JDBC, there is no issue.

Can you please throw some light on this?

Regards,
Sajeev

1 Like

Any luck with this ? I am getting same error and I can’t figure it out

Not sure how you are creating a table. The create table syntax was only recently added.

https://docs.dremio.com/sql-reference/sql-commands/tables.html#creating-tables

I’m assuming you’ve added the Dremio JDBC jar to the Spark’s jar list

.