<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Impala connection string for cluster with ssl enabled and kerberos auth in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281583#M209458</link>
    <description>&lt;P&gt;Ref. pg. 12 "To configure default Kerberos authentication"[1], the&amp;nbsp;KrbHostFQDN should be the fully qualified domain name of the Impala server host you are trying to connect to. In this case, it should be "&lt;SPAN&gt;mycluster.lan".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd try that first and see if it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-12/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf" target="_blank"&gt;https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-12/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 19:12:53 GMT</pubDate>
    <dc:creator>customer</dc:creator>
    <dc:date>2019-10-29T19:12:53Z</dc:date>
    <item>
      <title>Impala connection string for cluster with ssl enabled and kerberos auth</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281546#M209432</link>
      <description>&lt;P&gt;Dear community,&lt;BR /&gt;we have a problem when connecting to impala with the impala jdbc connector.&lt;/P&gt;&lt;P&gt;Our cluster setup is:&lt;BR /&gt;cdh 6.2/impala 3.2&lt;BR /&gt;kerberos enabled&lt;BR /&gt;ssl activated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our cluster 's configuration has been checked thoroughly and the cluster is correctly processing high volumes of data, using kerberos authentication and has security/sentry etc in place. SSL and kerberos processes work fine, in other words this is not a cluster we just started setting up.&lt;BR /&gt;&lt;BR /&gt;We have an issue when making a connection from a java program using the impala jdbc connector.&lt;BR /&gt;I am following the documentation on &lt;A href="https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-11/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf" target="_blank" rel="noopener"&gt;https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-11/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf&lt;/A&gt; (-&amp;gt; page 12 and 88 contain detailed explanation about the connection strings and each possible option for Kerberos ).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When we use a connection string including ssl and authentication mechanism 3 and provide the ldap user/password this works fine:&lt;BR /&gt;#WORKS FINE&lt;BR /&gt;impalaConnectionURL=jdbc:impala://mycluster.lan:21050/default;AuthMech=3;krbRealm=MYCOMPANY.COM;SSL=1;SSLKeyStore=/opt/cloudera/security/thekey.jks;SSLKeyStorePwd=correctpassword;UID=correctuser;PWD=correctpassword&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However we would like to connect using Kerberos authentication:&lt;/P&gt;&lt;P&gt;#DOES NOT WORK&lt;BR /&gt;impalaConnectionURL=jdbc:impala://mycluster.lan:21050/default;AuthMech=1;krbRealm=MYCOMPANY.COM;KrbHostFQDN=correctnode.lan;KrbServiceName=impala;SSL=1;SSLKeyStore=/opt/cloudera/security/thekey.jks;SSLKeyStorePwd=correctpassword;LogLevel=6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Breakdown of field used + motivation that values are correct in our opinion:&lt;BR /&gt;AuthMech=1; --&amp;gt;Kerberos Authentication&lt;BR /&gt;krbRealm=MYCOMPANY.COM; --&amp;gt;correct as klist returns: user@MYCOMPANY.COM&lt;BR /&gt;KrbHostFQDN=correctnode.lan; --&amp;gt; server where kerberos runs (on this server sudo service krb5kdc status shows it is active)&lt;BR /&gt;KrbServiceName=impala --&amp;gt; service for which kerberos authenitcation is used: this case impala&lt;BR /&gt;LogLevel=6 --&amp;gt;want to print as much info as possible&lt;BR /&gt;SSL=1; --&amp;gt; using ssl&lt;BR /&gt;SSLKeyStore=/opt/cloudera/security/pki/server.jks; --&amp;gt; specifying keystore&lt;BR /&gt;SSLKeyStorePwd=&amp;lt;pwd&amp;gt; --&amp;gt; password for keystore --&amp;gt; this is correct as it works when we do not use kerberos (see above)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Encountered error (JAVA log):&lt;/P&gt;&lt;P&gt;-------------------------------------------&lt;/P&gt;&lt;P&gt;java.sql.SQLException: [Cloudera][ImpalaJDBCDriver](500164) Error initialized or created transport for authentication: [Cloudera][ImpalaJDBCDriver](500169) Unable to connect to server: GSS initiate failed.&lt;/P&gt;&lt;P&gt;at com.cloudera.impala.hivecommon.api.HiveServer2ClientFactory.createTransport(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.cloudera.impala.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.cloudera.impala.hivecommon.core.HiveJDBCCommonConnection.establishConnection(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.cloudera.impala.impala.core.ImpalaJDBCConnection.establishConnection(Unknown Source)&lt;/P&gt;&lt;P&gt;at com.cloudera.impala.jdbc.core.LoginTimeoutConnection.connect(Unknown Source)&lt;BR /&gt;...&lt;BR /&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1855)&lt;/P&gt;&lt;P&gt;Caused by: com.cloudera.impala.support.exceptions.GeneralException: [Cloudera][ImpalaJDBCDriver](500164) Error initialized or created transport for authentication: [Cloudera][ImpalaJDBCDriver](500169) Unable to connect to server: GSS initiate failed.&lt;/P&gt;&lt;P&gt;... 16 common frames omitted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;impala log:&lt;/P&gt;&lt;P&gt;----------------&lt;/P&gt;&lt;P&gt;I1029 14:08:34.201046 119410 thrift-util.cc:123] TAcceptQueueServer: Caught TException: sasl Peer indicated failure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if there are known issues using both kerberos and ssl in the impala jdbc string because of :&lt;BR /&gt;1)in the docs /online all examples for SSL use authentication mechanism=3- I have not found a single example using kerberos and ssl combined&lt;BR /&gt;2)I noticed a remark (&lt;A href="https://docs.cloudera.com/documentation/enterprise/6/6.2/topics/impala_jdbc.html" target="_blank" rel="noopener"&gt;https://docs.cloudera.com/documentation/enterprise/6/6.2/topics/impala_jdbc.html&lt;/A&gt;) :Prior to CDH 5.7 / Impala 2.5, the Hive JDBC driver did not support connections that use both Kerberos authentication and SSL encryption. Is possibly a similar issue also known for impala?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for any thoughts/input!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 13:14:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281546#M209432</guid>
      <dc:creator>JB000000000001</dc:creator>
      <dc:date>2019-10-29T13:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Impala connection string for cluster with ssl enabled and kerberos auth</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281583#M209458</link>
      <description>&lt;P&gt;Ref. pg. 12 "To configure default Kerberos authentication"[1], the&amp;nbsp;KrbHostFQDN should be the fully qualified domain name of the Impala server host you are trying to connect to. In this case, it should be "&lt;SPAN&gt;mycluster.lan".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd try that first and see if it work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-12/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf" target="_blank"&gt;https://docs.cloudera.com/documentation/other/connectors/impala-jdbc/2-6-12/Cloudera-JDBC-Driver-for-Impala-Install-Guide.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 19:12:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281583#M209458</guid>
      <dc:creator>customer</dc:creator>
      <dc:date>2019-10-29T19:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Impala connection string for cluster with ssl enabled and kerberos auth</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281617#M209480</link>
      <description>&lt;P&gt;Great spot!&lt;/P&gt;&lt;P&gt;Indeed you are right, the KrbHostFQDN is not the host where kerberos runs on, but will be the impala host.&lt;/P&gt;&lt;P&gt;This fixed my error.&lt;/P&gt;&lt;P&gt;Many thanks for taking the time to read through the post and give the appropriate solution!&lt;/P&gt;&lt;P&gt;PS:&lt;/P&gt;&lt;P&gt;I believe then KrbHostFQDN will always be the same as the impala host we connect to (the value "impalahost" in jdbc:impala://impalahost), so one could ask why it is worth having a separate config option for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 08:44:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-connection-string-for-cluster-with-ssl-enabled-and/m-p/281617#M209480</guid>
      <dc:creator>JB000000000001</dc:creator>
      <dc:date>2019-10-30T08:44:26Z</dc:date>
    </item>
  </channel>
</rss>

