Created on 10-23-2015 03:29 AM - edited 09-16-2022 02:45 AM
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.
Created 02-16-2016 06:51 AM
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
Created 10-27-2015 11:40 AM
Hi Shanika – can you provide more details on your configuration? Specifically:
Created 10-27-2015 07:00 PM
[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
Created 02-16-2016 05:47 AM
Created 02-16-2016 06:51 AM
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
Created 10-13-2017 04:06 AM
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
Created 05-03-2018 01:35 AM
For others that maybe have the same problem.
The fix for us was to use the full username, setting the LDAP domain also:
user@REALM.COM
And for some tools the Use SASL option needs to be enabled. For example in Database Browser.
Hope it helps someone.