<?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: beeline connect via Knox - SSL issue in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140756#M19469</link>
    <description>&lt;P&gt;Step 1 requires the following syntax tweak to include the alias otherwise you get an error like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;keytool error: java.lang.Exception: Alias &amp;lt;mykey&amp;gt; does not exist&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;keytool -exportcert -file knox.crt -keystore ./gateway.jks -storepass &amp;lt;master-secret-password&amp;gt; -alias &amp;lt;alias-used-to-create-key&amp;gt;
&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Jul 2016 08:49:58 GMT</pubDate>
    <dc:creator>Mark_Petronic</dc:creator>
    <dc:date>2016-07-06T08:49:58Z</dc:date>
    <item>
      <title>beeline connect via Knox - SSL issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140753#M19466</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to connect to Hive through Knox, via beeline (HDP2.2.4, Knox0.4)&lt;/P&gt;&lt;P&gt;Based on &lt;A href="http://hortonworks.com/hadoop-tutorial/secure-jdbc-odbc-clients-access-hiveserver2-using-apache-knox/" target="_blank"&gt;http://hortonworks.com/hadoop-tutorial/secure-jdbc-odbc-clients-access-hiveserver2-using-apache-knox/&lt;/A&gt; I set the described config parameters accordingly, but the chapter with the SSL certification I don't know what is meant there.&lt;/P&gt;&lt;P&gt;I have to use a self-signed certificate, therefore I just tried exactly the same sslTrustStore and sslTrustStorePassword values as in the document, but it is failing with:&lt;/P&gt;&lt;PRE&gt;16/02/14 15:40:11 [main]: WARN jdbc.Utils: ***** JDBC param deprecation *****
16/02/14 15:40:11 [main]: WARN jdbc.Utils: The use of hive.server2.transport.mode is deprecated.
16/02/14 15:40:11 [main]: WARN jdbc.Utils: Please use transportMode like so: jdbc:hive2://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/dbName;transportMode=&amp;lt;transport_mode_value&amp;gt;
16/02/14 15:40:11 [main]: WARN jdbc.Utils: ***** JDBC param deprecation *****
16/02/14 15:40:11 [main]: WARN jdbc.Utils: The use of hive.server2.thrift.http.path is deprecated.
16/02/14 15:40:11 [main]: WARN jdbc.Utils: Please use httpPath like so: jdbc:hive2://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/dbName;httpPath=&amp;lt;http_path_value&amp;gt;
Error: Could not create an https connection to jdbc:hive2://&amp;lt;knox-host&amp;gt;:8443/;ssl=true;sslTrustStore=/var/lib/knox/data/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/default/hive. Keystore was tampered with, or password was incorrect (state=08S01,code=0)&lt;/PRE&gt;&lt;P&gt;My connect string:&lt;/P&gt;&lt;PRE&gt;beeline&amp;gt; !connect jdbc:hive2://&amp;lt;knox-host&amp;gt;:8443/;ssl=true;sslTrustStore=/var/lib/knox/data/security/keystores/gateway.jks;trustStorePassword=knox?hive.server2.transport.mode=http;hive.server2.thrift.http.path=gateway/default/hive&lt;/PRE&gt;&lt;P&gt;The referenced documentation says in Step 4:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;In the example here, I am connecting to Knox on &lt;A href="http://hortonworks.com/products/hortonworks-sandbox/"&gt;HDP 2.1 Sandbox&lt;/A&gt; which uses a self-signed certificate for SSL. I have exported this certificate to a file in /root/truststore.jks and set a password to this file&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But what exactly means "&lt;STRONG&gt;this certificate&lt;/STRONG&gt;" and what is its password to export it into another file, some default values there ?!?!&lt;/P&gt;&lt;P&gt;What am I missing to create a beeline-via-Knox connection successfully ?!?!&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 22:50:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140753#M19466</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2016-02-14T22:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: beeline connect via Knox - SSL issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140754#M19467</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;after some searching (and thanks to &lt;A href="https://community.hortonworks.com/questions/316/hive-jdbc-via-knox-and-configuring-hive-in-ranger.html"&gt;this post&lt;/A&gt;), the SSL truststore access problem is solved.&lt;/P&gt;&lt;P&gt;Just replace the value for "trustStorePassword" by your knox-master-secret set during installation of Knox.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 00:45:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140754#M19467</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2016-02-15T00:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: beeline connect via Knox - SSL issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140755#M19468</link>
      <description>&lt;P&gt;I know that this question already has an answer and I do not mean to troll or demean anyone's answer.  I came across this post while searching for information about this very same thing and came up with a similar solution, but one that does not distribute the Knox server trustStore or the master secret key.
To achieve the same thing, do the following&lt;/P&gt;&lt;P&gt;1. Export a server certificate from the Knox self-signed cert that you will distribute to users/clients.  On the Knox server:&lt;/P&gt;&lt;PRE&gt;# cd /usr/hdp/current/knox-server/data/security/keystores
# keytool -exportcert -file knox.crt -keystore ./gateway.jks -storepass &amp;lt;master-secret-password&amp;gt;&lt;/PRE&gt;&lt;P&gt;2. On the client machines (from which you will be connecting to hive through beeline) import the Knox cert into a user specific trustStore.  If the .jks file into which you are importing this cert already exists you will need to enter the password that you used when you created it.  If the jks file into which are importing does not yet exist it will ask you for a new password.  DO NOT LOSE THIS PASSWORD you will need it when including the trustStore in the beeline connection string.&lt;/P&gt;&lt;PRE&gt;$ keytool -import -keystore myLocalTrustStore.jks -file knox.crt&lt;/PRE&gt;&lt;P&gt;Now, you can connect to beeline as follows and it will prompt you for the username and password for the authentication implementation that you used when configuring Knox.&lt;/P&gt;&lt;PRE&gt;$ beeline -u 'jdbc:hive2://knox-server-hostname:8443/database-name/;ssl=true;sslTrustStore=/path/to/myLocalTrustStore.jks;trustStorePassword=&amp;lt;your-trust-store-passwd&amp;gt;;transportMode=http;httpPath=gateway/default/hive'&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2016 03:24:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140755#M19468</guid>
      <dc:creator>rchapin</dc:creator>
      <dc:date>2016-05-05T03:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: beeline connect via Knox - SSL issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140756#M19469</link>
      <description>&lt;P&gt;Step 1 requires the following syntax tweak to include the alias otherwise you get an error like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;keytool error: java.lang.Exception: Alias &amp;lt;mykey&amp;gt; does not exist&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;keytool -exportcert -file knox.crt -keystore ./gateway.jks -storepass &amp;lt;master-secret-password&amp;gt; -alias &amp;lt;alias-used-to-create-key&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jul 2016 08:49:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140756#M19469</guid>
      <dc:creator>Mark_Petronic</dc:creator>
      <dc:date>2016-07-06T08:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: beeline connect via Knox - SSL issue</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140757#M19470</link>
      <description>&lt;P&gt;@ Ryan Chaplin/@Mark Petronic&lt;/P&gt;&lt;P&gt;I am unable to connect on hive through knox using zokeeper dynamic discovery. Below details of my cluster.&lt;/P&gt;&lt;P&gt;HDP:  2.6&lt;/P&gt;&lt;P&gt;Kerberos Enabled:   YES ( Windows AD 2012 R2)&lt;/P&gt;&lt;P&gt;Authentication:  AD with LDAPS ( Windows AD 2012 R2)&lt;/P&gt;&lt;P&gt;Ranger Enabled:  YES&lt;/P&gt;&lt;P&gt;RANGER Usersync and GroupSync:   YES with windows AD&lt;/P&gt;&lt;P&gt;Ambari Enabled AD:   YES&lt;/P&gt;&lt;P&gt;KNOX Enabled with AD:  YES (except Admin account/topology)&lt;/P&gt;&lt;P&gt;KNOX advance topology have definition for zookeeper dynamic discovery and webhdfs ha:   YES&lt;/P&gt;&lt;P&gt;While connecting on HIVE through beeline getting error as "Invalid status 72 (state=08S01,code=0)"&lt;/P&gt;&lt;P&gt;[ajay@vijayhdp-1 ~]$ beeline Beeline version 1.2.1000.2.6.3.0-235 by Apache Hive beeline&amp;gt; !connect jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive Connecting to jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive Enter username for jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive: ajay Enter password for jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive: ******** 17/12/22 15:43:57 [main]: WARN jdbc.HiveConnection: Failed to connect to vijayhdp-1.novalocal:8443 Error: Could not open client transport with JDBC Uri: jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive: Invalid status 72 (state=08S01,code=0) 0: jdbc:hive2://vijayhdp-1.novalocal:8443/ (closed)&amp;gt;&lt;/P&gt;&lt;P&gt;Kindly suggest to fix it.&lt;/P&gt;&lt;P&gt;- Vijay Mishra&lt;/P&gt;,&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/3280/rchapin.html"&gt;Ryan Chapin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am unable to connect on hive through knox using zokeeper dynamic discovery. Below details of my cluster.&lt;/P&gt;&lt;P&gt;HDP:  2.6&lt;/P&gt;&lt;P&gt;Kerberos Enabled:   YES ( Windows AD 2012 R2)&lt;/P&gt;&lt;P&gt;Authentication:  AD with LDAPS ( Windows AD 2012 R2)&lt;/P&gt;&lt;P&gt;Ranger Enabled:  YES&lt;/P&gt;&lt;P&gt;RANGER Usersync and GroupSync:   YES with windows AD&lt;/P&gt;&lt;P&gt;Ambari Enabled AD:   YES&lt;/P&gt;&lt;P&gt;KNOX Enabled with AD:  YES (except Admin account/topology)&lt;/P&gt;&lt;P&gt;KNOX advance topology have definition for zookeeper dynamic discovery and webhdfs ha:   YES&lt;/P&gt;&lt;P&gt;While connecting on HIVE through beeline getting error as "Invalid status 72 (state=08S01,code=0)"&lt;/P&gt;&lt;P&gt;[ajay@vijayhdp-1 ~]$ beeline
Beeline version 1.2.1000.2.6.3.0-235 by Apache Hive
beeline&amp;gt; !connect jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive
Connecting to jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive
Enter username for jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive: ajay
Enter password for jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive: ********
17/12/22 15:43:57 [main]: WARN jdbc.HiveConnection: Failed to connect to vijayhdp-1.novalocal:8443
Error: Could not open client transport with JDBC Uri: jdbc:hive2://vijayhdp-1.novalocal:8443/;ssl=true;sslTrustStore=/tmp/myLocalTrustStore.jks;trustStorePassword=password?transportMode=http;httpPath=gateway/default/hive: Invalid status 72 (state=08S01,code=0)
0: jdbc:hive2://vijayhdp-1.novalocal:8443/ (closed)&amp;gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest to fix it.&lt;/P&gt;&lt;P&gt;- Vijay Mishra&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2017 02:45:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/beeline-connect-via-Knox-SSL-issue/m-p/140757#M19470</guid>
      <dc:creator>VijayM</dc:creator>
      <dc:date>2017-12-23T02:45:12Z</dc:date>
    </item>
  </channel>
</rss>

