You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by "mohit.kaushik" <mo...@orkash.com> on 2015/05/12 14:23:25 UTC

Drill ODBC connection test fails

I am trying to configure the Drill ODBC driver on centos. I have 
installed the iodbc driver manager "libiodbc-3.52.10" and the Drill 
driver "MapRDrillODBC-0.09.0.x86_64.rpm" and I am using the 
Driver=/opt/mapr/drillodbc/lib/64/libmaprdrillodbc64.so. my zkClusterId 
is correct. I have checked everything many times but haveing problem 
while trying to test connection with "iodbctest"

1: SQLDriverConnect = [iODBC][Driver Manager]Sample MapR Drill DSN 64: 
cannot open shared object file: No such file or directory (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not 
be loaded (0) SQLSTATE=IM003

The documentation says


      [iODBC][Driver Manager]Data source name not found and no default
      driver specified. Driver could not be loaded, SQLSTATE=IM002

There are several reasons why this message could occur. The best 
solution is to trace through what's happening: your application has been 
linked against libiodbc, which has tried to find an odbc.ini file one 
way or another - either through the ODBCINI environment variable or the 
fall-back paths (typically /etc/odbc.ini, depending on how it was 
compiled). You should check that such a file exists in a suitable 
location, and that it is accessible (particularly if your application 
runs with different user privileges - such as apache/php running as a 
www-data user).

Additionally, it could be that iODBC has found a suitable odbc.ini file, 
but none of the file(s) found contain the DSN you've requested. Check 
the syntax of your request - is the ODBC connect-string correct, and 
does the DSN you're requesting exist? See also the section of this FAQ, 
above, entitled `What's an odbc.ini and what do I put in it?'.

I see no permission issues, file is present and is not corrupt. Any hints?

Regards
Signature

*Mohit Kaushik*
Software Engineer
A Square,Plot No. 278, Udyog Vihar, Phase 2, Gurgaon 122016, India
*Tel:*+91 (124) 4969352 | *Fax:*+91 (124) 4033553

<http://politicomapper.orkash.com>interactive social intelligence at work...

<https://www.facebook.com/Orkash2012> 
<http://www.linkedin.com/company/orkash-services-private-limited> 
<https://twitter.com/Orkash> <http://www.orkash.com/blog/> 
<http://www.orkash.com>
<http://www.orkash.com> ... ensuring Assurance in complexity and uncertainty

/This message including the attachments, if any, is a confidential 
business communication. If you are not the intended recipient it may be 
unlawful for you to read, copy, distribute, disclose or otherwise use 
the information in this e-mail. If you have received it in error or are 
not the intended recipient, please destroy it and notify the sender 
immediately. Thank you /




Re: Drill ODBC connection test fails

Posted by Andries Engelbrecht <ae...@maprtech.com>.
Haven’t tried on CentOS, but have you checked the latest documentation?
http://drill.apache.org/docs/configuring-connections-on-linux-and-mac-os-x/

On OSX I found that the odbc.ini file in the user home directory controls the user DSN and the odic.ini in the /Library/ODBC/odbc.ini controls the system DSN.

Here is a sample odbc.ini file (I found it easier to edit the file vs using the iODBC admin tool). The last entry is for 0.9 + when Authentication is enabled for Drill.

[ODBC Data Sources]
Drill Direct = MapR Drill ODBC Driver
Drill Zookeeper   = MapR Drill ODBC Driver
Drill Secure      = MapR Drill ODBC Driver

[Drill Direct]
Driver              = /opt/mapr/drillodbc/lib/universal/libmaprdrillodbc.dylib
ConnectionType      = Direct
HOST                = maprdemo
PORT                = 31010
Catalog             = DRILL
AdvanacedProperties = CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;

[Drill Zookeeper]
Driver              = /opt/mapr/drillodbc/lib/universal/libmaprdrillodbc.dylib
ConnectionType      = Zookeeper
HOST                = [HOST]
PORT                = [PORT]
ZKQuorum            = maprdemo:5181
ZKClusterID         = demo_mapr_com-drillbits
Catalog             = DRILL
AdvanacedProperties = CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;

[Drill Secure]
Driver              = /opt/mapr/drillodbc/lib/universal/libmaprdrillodbc.dylib
ConnectionType      = Zookeeper
HOST                = [HOST]
PORT                = [PORT]
ZKQuorum            = drill-test:5181
ZKClusterID         = drill-test-drillbits
Catalog             = DRILL
AuthenticationType  = Basic Authentication
AdvanacedProperties = CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;

Maybe these pointers will be helpful to track down your issue.

—Andries




On May 12, 2015, at 5:23 AM, mohit.kaushik <mo...@orkash.com> wrote:

> 
> I am trying to configure the Drill ODBC driver on centos. I have installed the iodbc driver manager "libiodbc-3.52.10" and the Drill driver "MapRDrillODBC-0.09.0.x86_64.rpm" and I am using the Driver=/opt/mapr/drillodbc/lib/64/libmaprdrillodbc64.so. my zkClusterId is correct. I have checked everything many times but haveing problem while trying to test connection with "iodbctest"
> 
> 1: SQLDriverConnect = [iODBC][Driver Manager]Sample MapR Drill DSN 64: cannot open shared object file: No such file or directory (0) SQLSTATE=00000
> 2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003
> 
> The documentation says
> [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded, SQLSTATE=IM002
> 
> There are several reasons why this message could occur. The best solution is to trace through what's happening: your application has been linked against libiodbc, which has tried to find an odbc.ini file one way or another - either through the ODBCINI environment variable or the fall-back paths (typically /etc/odbc.ini, depending on how it was compiled). You should check that such a file exists in a suitable location, and that it is accessible (particularly if your application runs with different user privileges - such as apache/php running as a www-data user).
> 
> Additionally, it could be that iODBC has found a suitable odbc.ini file, but none of the file(s) found contain the DSN you've requested. Check the syntax of your request - is the ODBC connect-string correct, and does the DSN you're requesting exist? See also the section of this FAQ, above, entitled `What's an odbc.ini and what do I put in it?'.
> I see no permission issues, file is present and is not corrupt. Any hints?
> Regards
> Mohit Kaushik 
> Software Engineer
> A Square,Plot No. 278, Udyog Vihar, Phase 2, Gurgaon 122016, India 
> Tel: +91 (124) 4969352 | Fax: +91 (124) 4033553 
> 
> <Mail Attachment.jpeg>interactive social intelligence at work...
> 
> <Mail Attachment.png> <Mail Attachment.png> <Mail Attachment.png> <Mail Attachment.png> <Mail Attachment.bmp>
> <graphics1.jpeg> ... ensuring Assurance in complexity and uncertainty
> 
> This message including the attachments, if any, is a confidential business communication. If you are not the intended recipient it may be unlawful for you to read, copy, distribute, disclose or otherwise use the information in this e-mail. If you have received it in error or are not the intended recipient, please destroy it and notify the sender immediately. Thank you
> 
> 
>