Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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.

9 REPLIES 9

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,
Senior 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,
Senior 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
Frequent Visitor

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
Frequent Visitor

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

avatar
Frequent Visitor

@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
Frequent Visitor

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.

avatar
Contributor

I finally had success using HTTP transport. My .odbc.ini looks something like this:
```

[ODBC]

; Specify any global ODBC configuration here such as ODBC tracing.
[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=[datahub-name]-master0.hiaa-cdp.uvmh-kdle.a4.cloudera.site
Port=443
Schema=default
AuthMech=3
UseSASL=1
SSL=1
TransportMode=http
httpPath=[datahub-name]/cdp-proxy-api/impala

```