You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Dev - personal <ob...@gmail.com> on 2021/06/15 16:23:17 UTC

unixODBC connot find drill driver

Hello,

I am trying to use drill with ODBC driver. I am using CentOS Linux release 8.3.2011 in docker from image centos:8. Whenever I try to connect to drill driver using isql -v "MapRDrillODBC", I get following error:

[01000][unixODBC][Driver Manager]Can't open lib '/opt/mapr/drill/lib/64/libdrillodbc_sb64.so' : file not found
[ISQL]ERROR: Could not SQLConnect

But the file libdrillodbc_sb64.so is clearly in the filesystem in that path.

I installed odbc driver using yum
yum install unixODBC.x86_64 unixODBC-devel.x86_64 -y

I set up drill driver using setting from the docs (https://drill.apache.org/docs/configuring-odbc-on-linux/)

I am using following Dockerfile setup:
FROM centos:8

RUN yum install curl -y
RUN curl -sL https://rpm.nodesource.com/setup_15.x | bash -
RUN yum install nodejs -y

WORKDIR /usr/src/project
COPY . .

# Install unixODBC driver manager
RUN yum install -y make gcc*
RUN yum install unixODBC.x86_64 unixODBC-devel.x86_64 -y

# ODBC drill driver setup
RUN yum localinstall --nogpgcheck ./lib/drill-odbc/driver/maprdrill-1.5.1.1002-1.el7.x86_64.rpm -y
RUN mv ./lib/drill-odbc/config/mapr.drillodbc.ini ~/.mapr.drillodbc.ini
RUN mv ./lib/drill-odbc/config/odbc.ini ~/.odbc.ini
RUN mv ./lib/drill-odbc/config/odbcinst.ini ~/.odbcinst.ini
RUN export ODBCINI=~/.odbc.ini
RUN export MAPRDRILLINI=~/.mapr.drillodbc.ini
RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mapr/drill/lib/64

# cache is used to be able to mount node_modules dir to local machine for development
WORKDIR /usr/src/project/cache
COPY package*.json ./
RUN npm install --global node-gyp
RUN npm install
WORKDIR /usr/src/evee

EXPOSE 28201

COPY ./docker/dev/entrypoint.sh ./
RUN chmod +x ./entrypoint.sh

odic.ini
[ODBC]
Trace=no

[ODBC Data Sources]
MapRDrillODBC=MapR Drill ODBC Driver 64-bit

[MapRDrillODBC]
# This key is not necessary and is only to give a description of the data source.
Description=MapR Drill ODBC Driver (64-bit) DSN
# Driver: The location where the ODBC driver is installed to.
Driver=/opt/mapr/drill/lib/64/libdrillodbc_sb64.so
# The DriverUnicodeEncoding setting is only used for SimbaDM
# When set to 1, SimbaDM runs in UTF-16 mode.
# When set to 2, SimbaDM runs in UTF-8 mode.
#DriverUnicodeEncoding=2
# Values for ConnectionType, AdvancedProperties, Catalog, Schema should be set here.
# If ConnectionType is Direct, include Host and Port. If ConnectionType is ZooKeeper, include ZKQuorum and ZKClusterID
# They can also be specified on the connection string.
# AuthenticationType: No authentication; Username; Plain; Kerberos; MapRSASL;
ConnectionType=ZooKeeper
HOST=
PORT=
ZKQuorum=zoo1:2181,zoo2:2181,zoo3:2181
ZKClusterID=drillCluster
AuthenticationType=No Authentication
UID=[USERNAME]
PWD=[PASSWORD]
DelegationUID=
KrbServiceName=mapr
KrbServiceHost=
krbSpnConfigurationsRequired=1
AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;
Catalog=DRILL
Schema=
SSL=0
DisableHostVerification=0
DisableCertificateVerification=0
TrustedCerts=/opt/mapr/drill/lib/64/cacerts.pem
UseSystemTrustStore=0
# The key, "UseExactTLSProtocolVersion", toggles between "Min_TLS" or "TLSProtocol".
# UseExactTLSProtocolVersion=1 indicates that the driver should use the exact TLS Protocol version to communicate with the drillbit.
# UseExactTLSProtocolVersion=0 indicates that the driver should use the minimum TLS Protocol version to communicate with the drillbit.
UseExactTLSProtocolVersion=0
Min_TLS=
TLSProtocol=


odbcinst.ini
[ODBC Drivers]
MapRDrillODBC=Installed

[MapRDrillODBC]
Description=MapR Drill ODBC Driver(64-bit)
Driver=/opt/mapr/drill/lib/64/libdrillodbc_sb64.so



Could you please point me out, if this error can mean something else except the missing file? Or do you have any idea what can cause the issue? If you need more details, do not hesitate to contact me.

Thank you very much in advance for your cooperation,
Filip Obornik

Re: unixODBC connot find drill driver

Posted by luoc <lu...@apache.org>.
Hi Obornik,
  Could you please retry it on the host machine(not in the docker container) first?
Then you can use the command to ensure this lib be included in the system : ldconfig -v | grep “libdrillodbc".

> 2021年6月16日 上午12:23,Dev - personal <ob...@gmail.com> 写道:
> 
> Hello,
> 
> I am trying to use drill with ODBC driver. I am using CentOS Linux release 8.3.2011 in docker from image centos:8. Whenever I try to connect to drill driver using isql -v "MapRDrillODBC", I get following error:
> 
> [01000][unixODBC][Driver Manager]Can't open lib '/opt/mapr/drill/lib/64/libdrillodbc_sb64.so' : file not found
> [ISQL]ERROR: Could not SQLConnect
> 
> But the file libdrillodbc_sb64.so is clearly in the filesystem in that path.
> 
> I installed odbc driver using yum
> yum install unixODBC.x86_64 unixODBC-devel.x86_64 -y
> 
> I set up drill driver using setting from the docs (https://drill.apache.org/docs/configuring-odbc-on-linux/)
> 
> I am using following Dockerfile setup:
> FROM centos:8
> 
> RUN yum install curl -y
> RUN curl -sL https://rpm.nodesource.com/setup_15.x | bash -
> RUN yum install nodejs -y
> 
> WORKDIR /usr/src/project
> COPY . .
> 
> # Install unixODBC driver manager
> RUN yum install -y make gcc*
> RUN yum install unixODBC.x86_64 unixODBC-devel.x86_64 -y
> 
> # ODBC drill driver setup
> RUN yum localinstall --nogpgcheck ./lib/drill-odbc/driver/maprdrill-1.5.1.1002-1.el7.x86_64.rpm -y
> RUN mv ./lib/drill-odbc/config/mapr.drillodbc.ini ~/.mapr.drillodbc.ini
> RUN mv ./lib/drill-odbc/config/odbc.ini ~/.odbc.ini
> RUN mv ./lib/drill-odbc/config/odbcinst.ini ~/.odbcinst.ini
> RUN export ODBCINI=~/.odbc.ini
> RUN export MAPRDRILLINI=~/.mapr.drillodbc.ini
> RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mapr/drill/lib/64
> 
> # cache is used to be able to mount node_modules dir to local machine for development
> WORKDIR /usr/src/project/cache
> COPY package*.json ./
> RUN npm install --global node-gyp
> RUN npm install
> WORKDIR /usr/src/evee
> 
> EXPOSE 28201
> 
> COPY ./docker/dev/entrypoint.sh ./
> RUN chmod +x ./entrypoint.sh
> 
> odic.ini
> [ODBC]
> Trace=no
> 
> [ODBC Data Sources]
> MapRDrillODBC=MapR Drill ODBC Driver 64-bit
> 
> [MapRDrillODBC]
> # This key is not necessary and is only to give a description of the data source.
> Description=MapR Drill ODBC Driver (64-bit) DSN
> # Driver: The location where the ODBC driver is installed to.
> Driver=/opt/mapr/drill/lib/64/libdrillodbc_sb64.so
> # The DriverUnicodeEncoding setting is only used for SimbaDM
> # When set to 1, SimbaDM runs in UTF-16 mode.
> # When set to 2, SimbaDM runs in UTF-8 mode.
> #DriverUnicodeEncoding=2
> # Values for ConnectionType, AdvancedProperties, Catalog, Schema should be set here.
> # If ConnectionType is Direct, include Host and Port. If ConnectionType is ZooKeeper, include ZKQuorum and ZKClusterID
> # They can also be specified on the connection string.
> # AuthenticationType: No authentication; Username; Plain; Kerberos; MapRSASL;
> ConnectionType=ZooKeeper
> HOST=
> PORT=
> ZKQuorum=zoo1:2181,zoo2:2181,zoo3:2181
> ZKClusterID=drillCluster
> AuthenticationType=No Authentication
> UID=[USERNAME]
> PWD=[PASSWORD]
> DelegationUID=
> KrbServiceName=mapr
> KrbServiceHost=
> krbSpnConfigurationsRequired=1
> AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;
> Catalog=DRILL
> Schema=
> SSL=0
> DisableHostVerification=0
> DisableCertificateVerification=0
> TrustedCerts=/opt/mapr/drill/lib/64/cacerts.pem
> UseSystemTrustStore=0
> # The key, "UseExactTLSProtocolVersion", toggles between "Min_TLS" or "TLSProtocol".
> # UseExactTLSProtocolVersion=1 indicates that the driver should use the exact TLS Protocol version to communicate with the drillbit.
> # UseExactTLSProtocolVersion=0 indicates that the driver should use the minimum TLS Protocol version to communicate with the drillbit.
> UseExactTLSProtocolVersion=0
> Min_TLS=
> TLSProtocol=
> 
> 
> odbcinst.ini
> [ODBC Drivers]
> MapRDrillODBC=Installed
> 
> [MapRDrillODBC]
> Description=MapR Drill ODBC Driver(64-bit)
> Driver=/opt/mapr/drill/lib/64/libdrillodbc_sb64.so
> 
> 
> 
> Could you please point me out, if this error can mean something else except the missing file? Or do you have any idea what can cause the issue? If you need more details, do not hesitate to contact me.
> 
> Thank you very much in advance for your cooperation,
> Filip Obornik