Skip to main content
gfragkos
Silver ⭐️⭐️⭐️
April 28, 2022
Question

R client connections fails with CDP Impala

I am having trouble with the Impala connection from R with the following error:

 

'Error: nanodbc/nanodbc.cpp:983: 00000: [unixODBC][Cloudera][DriverSupport] (1100) SSL certificate verification failed because the certificate is missing or incorrect.'

 

Here is the connection details in our code:

 

impala = src_impala(

     drv = drv,

     driver = "/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so",

     host = "cdp-tdh-de3-master0.cdp-tdh.u5te-1stu.cloudera.site",

     database = db,

     port = 21050,

     uid = username,

     pwd = password,

     AuthMech = 3,

     transportMode="http",

     httpPath="cdp-tdh-de3/cdp-proxy-api/impala",

     ssl = 1,

    sslTrustStore="/home/csso_innovation.cdh/gateway-client-trust.jks"

)

return(impala)

 

Any help is appreciated.

Thanks,

Gozde

11 replies

mszurap
Platinum ⭐️
Platinum ⭐️
April 28, 2022

Hello Gozde @gfragkos ,

Have you checked whether the connectivity works with the given sslTrustStore file with a Java based client? (for example with beeline)

As I see your application tries to use unixODBC to connect to a CDP / Impala service. However from the shared connection details I see that the truststore is a Java keystore file (JKS), and since the "nanodbc.cpp" is not a Java based application, it probably cannot recognize that as a valid truststore file. Please try to use a "pem" format trustrstore file instead.

 

Please also review the Impala ODBC Driver documentation:

https://downloads.cloudera.com/connectors/impala_odbc_2.6.14.1016/Cloudera-ODBC-Connector-for-Impala-Install-Guide.pdf

 

Thanks

 Miklos

Translate
gfragkos
gfragkosAuthor
Silver ⭐️⭐️⭐️
May 2, 2022

Hi Miklos,

 

Thanks a lot for your message.

I edited the code as follows and tried again but it gives the same error. Do you think there is something missing or wrong in the code below?

 

drv = odbc::odbc()

impala = src_impala(
drv = drv,
driver = "/opt/cloudera/impalaodbc/lib/64/libclouderaimpalaodbc64.so",
host = "cdp-tdh-de3-master0.cdp-tdh.u5te-1stu.cloudera.site",
database = db,
port = 21050,
uid = username,
pwd = password,
KrbRealm = "",
KrbFQDN = "",
KrbServiceName = "impala",
AuthMech = 3,
ssl = 1,
sslTrustStore="/var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_cacerts.pem"
)
return(impala)

 

Thanks a lot,

Gozde

 

Translate
mszurap
Platinum ⭐️
Platinum ⭐️
May 2, 2022

Hi @gfragkos, thanks for checking. Let's step back then. Is the Impala service TLS/SSL enabled at all? Can you verify that with openssl tools, like:

echo | openssl s_client -connect cdp-tdh-de3-master0.cdp-tdh.u5te-1stu.cloudera.site:21050 -CAfile /var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_cacerts.pem

 

Translate