Hello all ,
I am new to dremio ..I am attempting to test the connection using java:arrow-flight-client-examples/java at main · dremio-hub/arrow-flight-client-examples · GitHub and I am getting this errors when trying to connect to dremio .It was working fine when i tried connecting with python with tls enabled and .pem certification.Any advice on why this is occuring is appreciated. Thank You.
org.apache.arrow.flight.FlightRuntimeException: UNAVAILABLE: io exception
Channel Pipeline: [ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]
at org.apache.arrow.flight.CallStatus.toRuntimeException(CallStatus.java:121)
at org.apache.arrow.flight.grpc.StatusUtils.fromGrpcRuntimeException(StatusUtils.java:161)
at org.apache.arrow.flight.grpc.StatusUtils.fromThrowable(StatusUtils.java:182)
at org.apache.arrow.flight.auth2.ClientHandshakeWrapper.doClientHandshake(ClientHandshakeWrapper.java:55)
at org.apache.arrow.flight.FlightClient.handshake(FlightClient.java:212)
at com.adhoc.flight.client.AdhocFlightClient.authenticatePatOrAuthToken(AdhocFlightClient.java:313)
at com.adhoc.flight.client.AdhocFlightClient.getClientHelper(AdhocFlightClient.java:229)
at com.adhoc.flight.client.AdhocFlightClient.getEncryptedClient(AdhocFlightClient.java:139)
at com.adhoc.flight.QueryRunner.createFlightClient(QueryRunner.java:336)
at com.adhoc.flight.QueryRunner.runAdhoc(QueryRunner.java:249)
at com.adhoc.flight.QueryRunner.main(QueryRunner.java:301)
Caused by: javax.net.ssl.SSLHandshakeException: SslHandler removed before handshake completed
at io.netty.handler.ssl.SslHandler.handlerRemoved0(SslHandler.java:719)
at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:272)
at io.netty.channel.AbstractChannelHandlerContext.callHandlerRemoved(AbstractChannelHandlerContext.java:1138)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:563)
at io.netty.channel.DefaultChannelPipeline.internalAdd(DefaultChannelPipeline.java:203)
at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:246)
at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:240)
at io.grpc.netty.ProtocolNegotiators$ClientTlsHandler.handlerAdded0(ProtocolNegotiators.java:603)
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.handlerAdded(ProtocolNegotiators.java:1048)
at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:558)
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:521)
at io.netty.channel.DefaultChannelPipeline.replace(DefaultChannelPipeline.java:464)
at io.grpc.netty.ProtocolNegotiators$ProtocolNegotiationHandler.fireProtocolNegotiationEvent(ProtocolNegotiators.java:1089)
at io.grpc.netty.ProtocolNegotiators$WaitUntilActiveHandler.channelActive(ProtocolNegotiators.java:994)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:260)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:231)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1345)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:258)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:238)
at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:844)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:310)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
Disconnected from the target VM, address: ‘127.0.0.1:50629’, transport: ‘socket’
Hi @yash , could you provide some more details on what command line your using to test the connection?
Based on past experiences, this could be:
- The server is not properly configured to use TLS
- The java application is not capable of fetching the validating the certificate because it is not on its trusted store
Can you use -dsv to disable server TLS validation? Is that a valid option?
Hi @Helder_Gregorio , Thank you for your response , i tried using the -dsv option to disable the server TLS validation ,but i am still encountering the same error
Ssl Handler removed before handshake completed.
I have run this application via command java -jar target/java-flight-sample-client-application-1.0-SNAPSHOT-shaded.jar -dsv and i tried changing the dremio.conf file based on the [dremio-oss/common/src/main/resources/dremio-reference.conf at ed4d6b6c0e492c9e8fdb42d0d846f66c6b469535 · dremio/dremio-oss · GitHub](https://dremio conf) for a local dremio server ,added the certificate to the java trust store but still gettting the same error .Could you please advice on what else might be causing the issue ?Is there a specific configuration for dremio.conf present you can refer to me ?
Thank you for your help.