Hi,
I have a community edition of Dremio running and I could connect using either sample client (arrow-flight-sql-clients/flight-sql-clients at main · dremio-hub/arrow-flight-sql-clients · GitHub) or DBeaver. However when I use unixODBC + ODBC Driver (version: arrow-flight-sql-odbc-driver-0.9.1.168-1.x86_64.rpm), I always got the following error:
[08S01][unixODBC][Apache Arrow][Flight SQL] (500) Flight returned unavailable error, with message: failed to connect to all addresses. Please ensure your encryption settings match the server. [ISQL]ERROR: Could not SQLConnect
This is my odbc.ini:
`[ODBC Data Sources]
dremio=Arrow Flight SQL ODBC Driver
[dremio]
Description=ODBC Driver DSN for Arrow Flight SQL developed by Dremio
Driver=Arrow Flight SQL ODBC Driver
Host=9.30.245.190
Port=31010
UID=dremio
PWD=dremio123
UseEncryption=true
TrustedCerts=/opt/arrow-flight-sql-odbc-driver/lib64/cacerts.pem
UseSystemTrustStore=false`
Messages in server.log are as follows:
2022-08-10 07:43:04,815 [UserServer-1] ERROR c.d.exec.rpc.RpcExceptionHandler - Exception in RPC communication. Connection: /9.30.245.190:31010 <--> /9.30.119.171:44012 (user client). Closing connection. io.netty.handler.codec.CorruptedFrameException: Expected to read a tag of 10 but actually received a value of 3. Happened after reading 0 message. at com.dremio.exec.rpc.MessageDecoder.checkTag(MessageDecoder.java:224) at com.dremio.exec.rpc.MessageDecoder.decodeMessage(MessageDecoder.java:144) at com.dremio.exec.rpc.MessageDecoder.decode(MessageDecoder.java:70) at com.dremio.sabot.rpc.user.UserProtobufLengthDecoder.decode(UserProtobufLengthDecoder.java:35) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.lang.Thread.run(Thread.java:750) 2022-08-10 07:43:04,835 [UserServer-1] INFO c.d.sabot.rpc.user.UserRPCServer - [USER]: Channel closed /9.30.245.190:31010 <--> /9.30.119.171:44012 (user client) 2022-08-10 07:43:04,836 [UserServer-1] WARN c.d.e.s.o.SessionOptionManagerFactoryImpl - Could not find session with sessionId 1a31beff-6665-4c58-851c-e85e2e523547. 2022-08-10 07:43:04,836 [UserServer-1] INFO com.dremio.ConnectionLog - [1a31beff-6665-4c58-851c-e85e2e523547] Connection Closed 2022-08-10 07:43:04,836 [UserServer-1] INFO com.dremio.exec.rpc.MessageDecoder - Channel is closed, discarding remaining 156 byte(s) in buffer.
If I change Port in odbc.ini from 31010 to 32010, I got this SSL error and there is no log yield in server.log:
E0810 00:48:20.227235039 15991 ssl_transport_security.cc:1458] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. [08S01][unixODBC][Apache Arrow][Flight SQL] (500) Flight returned unavailable error, with message: failed to connect to all addresses. Please ensure your encryption settings match the server. [ISQL]ERROR: Could not SQLConnect
The services section in dremio.conf is like this:
services: { coordinator.enabled: true, coordinator.master.enabled: true, coordinator.client-endpoint: { port: 31010 }, executor.enabled: true, flight: { auth.mode: "arrow.flight.auth2", enabled: true, port: 32010, use_session_service: true }, fabric: { port: 45678, memory: { reservation: 100M } } }
I’m wondering whether it is possible to connect to community edition using ODBC? If so, what configuration do I miss?
Regards,
Shaoyi