Reply
New Contributor
Posts: 3
Registered: ‎10-23-2015
Accepted Solution

ODBC LDAP Auth SQLConnectW: [Cloudera][ThriftExtension] (6)

My ODBC driver (Linux 2.6.32-431.el6.x86_64 ODBC Driver version: 2.5.29.1009) worked properly without authentication.

But after enabling the LDAP authentication for Impala I cannot connect. It gives following error. SSL not enabled in the Impala server. 

(JDBC seems work properly for some application)

 

1. When SSL=1

--------------------

Oct 23 14:48:09 TRACE 905668352 ImpalaConnection::Connect: +++++ enter +++++
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: AuthMech: 3
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: CAIssuedCertNamesMismatch: 1
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: Database: db1
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: Description: New Cloudera Cluster
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: Driver: /opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: DSN: bigdata
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: HOST: impala.hostname
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: KrbFQDN:
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: KrbRealm:
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: KrbServiceName:
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: PORT: 21050
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: PWD: *****
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: RowsFetchedPerBlock: 10000
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: SocketTimeout: 0
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: SSL: 1
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: StringColumnLength: 32767
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: TrustedCerts: /opt/cloudera/impalaodbc/lib/64/cacerts.pem
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: TSaslTransportBufSize: 1000
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: UID: user1
Oct 23 14:48:09 DEBUG 905668352 DSConnectionUtils::LogConnectionSettings: UseNativeQuery: 0
Oct 23 14:48:09 DEBUG 905668352 ImpalaConnection::Connect: Enable simulated transactions: false
Oct 23 14:48:09 TRACE 905668352 ImpalaTCLIServiceThreadSafeClient::ImpalaTCLIServiceThreadSafeClient: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 ImpalaTCLIServiceThreadSafeClient::OpenSession: +++++ enter +++++
Oct 23 14:48:09 DEBUG 905668352 ImpalaTCLIServiceThreadSafeClient::OpenSession: TOpenSessionReq
client_protocol = HIVE_CLI_SERVICE_PROTOCOL_V6
Oct 23 14:48:09 TRACE 905668352 ImpalaTCLIServiceThreadSafeClient::~ImpalaTCLIServiceThreadSafeClient: +++++ enter +++++
Oct 23 14:48:09 ERROR 905668352 Connection::SQLConnectW: [Cloudera][ThriftExtension] (6) Error occurred while contacting server: SSL_connect: error code: 0. This could be because you are trying to establish a SSL connection to a server that does not have SSL enabled.
Oct 23 14:48:09 TRACE 905668352 CInterface::SQLGetDiagRec: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 CInterface::SQLGetDiagRec: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 CInterface::SQLFreeHandle: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 Environment::SQLFreeHandle: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 Driver::UnregisterConnection: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 CInterface::SQLFreeHandle: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 Driver::FreeEnvironment: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 Driver::GetEnvironment: +++++ enter +++++
Oct 23 14:48:09 TRACE 905668352 Driver::UnregisterEnvironment: +++++ enter +++++
[ISQL]ERROR: Could not SQLConnect

 

 

2. When SSL=0

-----------------

Oct 23 15:47:38 TRACE 235718400 ImpalaConnection::Connect: +++++ enter +++++
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: AuthMech: 3
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: CAIssuedCertNamesMismatch: 1
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: Database: db1
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: Description: New Cloudera Cluster
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: Driver: /opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: DSN: bigdata
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: HOST: impala.hostname
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: KrbFQDN:
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: KrbRealm:
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: KrbServiceName:
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: PORT: 21050
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: PWD: *****
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: RowsFetchedPerBlock: 10000
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: SocketTimeout: 0
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: SSL: 0
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: StringColumnLength: 32767
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: TrustedCerts: /opt/cloudera/impalaodbc/lib/64/cacerts.pem
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: TSaslTransportBufSize: 1000
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: UID: user1
Oct 23 15:47:38 DEBUG 235718400 DSConnectionUtils::LogConnectionSettings: UseNativeQuery: 0
Oct 23 15:47:38 DEBUG 235718400 ImpalaConnection::Connect: Enable simulated transactions: false
Oct 23 15:47:38 TRACE 235718400 ImpalaTCLIServiceThreadSafeClient::ImpalaTCLIServiceThreadSafeClient: +++++ enter +++++
Oct 23 15:47:38 TRACE 235718400 ImpalaTCLIServiceThreadSafeClient::OpenSession: +++++ enter +++++
Oct 23 15:47:38 DEBUG 235718400 ImpalaTCLIServiceThreadSafeClient::OpenSession: TOpenSessionReq
client_protocol = HIVE_CLI_SERVICE_PROTOCOL_V6
Oct 23 15:47:38 TRACE 235718400 ImpalaTCLIServiceThreadSafeClient::~ImpalaTCLIServiceThreadSafeClient: +++++ enter +++++
Oct 23 15:47:38 ERROR 235718400 Connection::SQLConnectW: [Cloudera][ThriftExtension] (5) Error occurred while contacting server: No more data to read.. This could be because you are trying to establish a non-SSL connection to a SSL-enabled server.

 

 

Cloudera Employee
Posts: 2
Registered: ‎07-22-2014

Re: ODBC LDAP Auth SQLConnectW: [Cloudera][ThriftExtension] (6)

Hi Shanika – can you provide more details on your configuration? Specifically:

  • Can you confirm that Impala is properly configured to use LDAP authentication? Assuming yes, then you should be able to confirm using a valid username/password in Impala Shell or Beeline.
  • Can you clarify whether or not SSL is configured for Impala?
  • Details on the configuration in odbc.ini?
New Contributor
Posts: 3
Registered: ‎10-23-2015

Re: ODBC LDAP Auth SQLConnectW: [Cloudera][ThriftExtension] (6)

  • LDAP is properly configured. We can coonect from impala-shell using LDAP username and passwords.
  • SSL not enabled in Impala. I think due to overhead.
  • Without LDAP (i.e. without authentication and AuthMech=0) this works properly.
  • Configurations is as follows.

[bigdata]
Description=New Cloudera Cluster
Driver=/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
HOST=impala.hostname
PORT=21050
Database=db1
AuthMech=3
UID=user1
PWD=*****
SSL=0
CAIssuedCertNamesMismatch=1
KrbFQDN=
KrbRealm=
KrbServiceName=
TSaslTransportBufSize=1000
RowsFetchedPerBlock=10000
SocketTimeout=0
StringColumnLength=32767
UseNativeQuery=0

New Contributor
Posts: 4
Registered: ‎06-24-2015

Re: ODBC LDAP Auth SQLConnectW: [Cloudera][ThriftExtension] (6)

Was this resolved? Running into the same issue, please share the resolution.
New Contributor
Posts: 3
Registered: ‎10-23-2015

Re: ODBC LDAP Auth SQLConnectW: [Cloudera][ThriftExtension] (6)

Yes. We had to enable SSL for impala. Final ODBC config like below 

 

[bigdata]
Description=New Cloudera Cluster
Driver=/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so
HOST=192.168.10.10
PORT=21050
Database=dbname
AuthMech=4
UID=username
PWD=password
SSL=1
CAIssuedCertNamesMismatch=1
TrustedCerts=/opt/cloudera/impalaodbc/lib/64/your_impala_ssl_cert.pem
KrbFQDN=
KrbRealm=
KrbServiceName=
TSaslTransportBufSize=1000
RowsFetchedPerBlock=10000
SocketTimeout=0
StringColumnLength=32767
UseNativeQuery=0

Highlighted
Explorer
Posts: 24
Registered: ‎08-29-2017

Re: ODBC LDAP Auth SQLConnectW: [Cloudera][ThriftExtension] (6)

HI

 

 

I am getting the following error. Can you pls advice. Thanks.

it's giving error
DBI connect('DRIVER={Cloudera Impala ODBC Driver 64-bit};Host=10.92.869.876;Port=21050','',...) failed: [unixODBC][Cloudera][ThriftExtension] (5) Error occurred while contacting server: No more data to read.. This could be because you are trying to establish a non-SSL connection to a SSL-enabled server. (SQL-HY000) at /tmp/test22.pl line 12

Announcements