Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Failure to connect to Impala via unixODBC on Mac - cannot locate driver

avatar
Contributor

I'm trying to connect to Impala on a new mac (M2 Chip). I followed all the steps here for unixODBC. I confirmed that my unixODBC install is working and that the Cloudera driver installed properly.

When I run `odbcinst -j` I get:

unixODBC 2.3.12
DRIVERS............: /opt/homebrew/etc/odbcinst.ini
SYSTEM DATA SOURCES: /opt/homebrew/etc/odbc.ini
FILE DATA SOURCES..: /opt/homebrew/etc/ODBCDataSources
USER DATA SOURCES..: /Users/willhipson/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

Here's my odbcinst.ini

 

[ODBC Drivers]
Cloudera ODBC Driver for Impala=Installed

[Impala]
Description=Cloudera ODBC Driver for Impala
Driver=/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib

 

 And here's the first few lines of my odbc.ini

 

[ODBC]

[ODBC Data Sources]
Impala=Cloudera ODBC Driver for Impala

[Impala]

Description=Cloudera Impala ODBC Driver DSN

Driver=Impala

 

I have confirmed that the driver exists in `/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib`

When I try to run `isql -v Impala` in the terminal I get the error:

 

[01000][unixODBC][Driver Manager]Can't open lib '/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib' : file not found
[ISQL]ERROR: Could not SQLConnect

 

I have been struggling to resolve this for several days and have scoured SO, blog posts, and this forum for help but nothing seems to work. Hoping to resolve soon.

8 REPLIES 8

avatar
Community Manager

@ipson Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Impala expert @bbreak  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Community Manager

@mszurap Any insights here? Thanks!


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Explorer

Did this ever get resolved? I am experiencing the same issue and cannot find any solution.

avatar
Contributor

No I'm still struggling with ODBC.

avatar
Explorer

Dang, that is really a shame. I submitted a ticket for this to support will share if they come up with any solution.

avatar
Explorer

@ipson I just figured this out with the help of one of my co-workers. The key for me was to edit the following to the file

 

/opt/cloudera/impalaodbc/lib/universal/cloudera.impalaodbc.ini

 

I had to add the location of the homebrew odbc lib file, for me, editing it to this worked:

 

[Driver]

ErrorMessagesPath=/opt/cloudera/impalaodbc/ErrorMessages/
LogLevel=0
LogPath=
ODBCInstLib=/opt/homebrew/lib/libodbcinst.dylib

 

avatar
Contributor

Thanks @nhassell , that's resolving the 'cannot locate driver' issue. Now I'm just hitting my head against pesky host/port configuration problems. For the life of me, I cannot get past:

```

[S1000][unixODBC][Cloudera][DriverSupport] (1170) Unexpected response received from server. Please ensure the server host and port specified for the connection are correct.

```

Obviously I'm doing something wrong. But your suggestion solved the issue around the driver library, so thanks.

avatar
Explorer

My odbc.ini looks like the following:

[ODBC Data Sources]
Impala=Cloudera ODBC Driver for Impala

[Impala]
Driver=/opt/cloudera/impalaodbc/lib/universal/libclouderaimpalaodbc.dylib
Description=Cloudera Impala ODBC Driver DSN
HOST=cdp-10.biotech.cdc.gov
PORT=21050
Schema=sc2_air
AuthMech=3
UID=****
PWD=****
UseSASL=1
SSL=1
AllowSelfSignedServerCert=1
AllowHostNameCNMismatch=1
TrustedCerts=/opt/cloudera/impalaodbc/lib/universal/cacerts.pem

Not sure what your settings are but maybe adjusting will help.