<?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 TLS connection string with username and password in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91567#M3930</link>
    <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;Have you tried below format:&lt;BR /&gt;&lt;BR /&gt;jdbc:hive2://hs2node:10000/default;user=&amp;lt;userid&amp;gt;;password=&amp;lt;password&amp;gt;&lt;BR /&gt;&lt;BR /&gt;together with other parameters?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Eric</description>
    <pubDate>Thu, 13 Jun 2019 05:38:03 GMT</pubDate>
    <dc:creator>EricL</dc:creator>
    <dc:date>2019-06-13T05:38:03Z</dc:date>
    <item>
      <title>Beeline TLS connection string with username and password</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91484#M3929</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I’m newer to Hive so I’m assuming that I’m doing something wrong. I’ve configured Hive to require LDAP BasedDN authentication (not AD) and configured TLS for HiveServer2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With beeline I’m able to authenticate with an interactive user prompt. For example:&lt;/P&gt;
&lt;PRE&gt;beeline&amp;gt; !connect jdbc:hive2://&amp;lt;serverName&amp;gt;:10000/default;ssl=true;sslTrustStore=&amp;lt;trustStorePath&amp;gt;.jks;trustStorePassword=&amp;lt;trustStorePassword&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Login with username and password:&lt;/P&gt;
&lt;PRE&gt;Enter username for jdbc:hive2://…
Enter password for jdbc:hive2://…&lt;/PRE&gt;
&lt;P&gt;What I would like to do is connect with username/password in the connection string. I see example to configure the connection string with TLS or username/password, but haven’t been able find an example of both. I’ve attempted combining settings and I’m doing something wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is an example of what I've attempted:&lt;/P&gt;
&lt;PRE&gt;beeline -u jdbc:hive2://&amp;lt;serverName&amp;gt;:10000/default;ssl=true;sslTrustStore=&amp;lt;truststorePath&amp;gt;.jks;trustStorePassword=&amp;lt;trustStorePassword&amp;gt; -n User -w /home/User/passwordFile.txt&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;beeline -u jdbc:hive2://&amp;lt;serverName&amp;gt;:10000/default;ssl=true;sslTrustStore=&amp;lt;truststorePath&amp;gt;.jks;trustStorePassword=&amp;lt;trustStorePassword&amp;gt; -n User -p userPassword&lt;/PRE&gt;
&lt;P&gt;Thanks for the help,&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:26:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91484#M3929</guid>
      <dc:creator>Steve206</dc:creator>
      <dc:date>2022-09-16T14:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline TLS connection string with username and password</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91567#M3930</link>
      <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;Have you tried below format:&lt;BR /&gt;&lt;BR /&gt;jdbc:hive2://hs2node:10000/default;user=&amp;lt;userid&amp;gt;;password=&amp;lt;password&amp;gt;&lt;BR /&gt;&lt;BR /&gt;together with other parameters?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Eric</description>
      <pubDate>Thu, 13 Jun 2019 05:38:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91567#M3930</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2019-06-13T05:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline TLS connection string with username and password</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91587#M3931</link>
      <description>&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion, but it didn't work. Below is output from trying and it shows that I'm able to login when prompted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[user@serverHostName ~]$ beeline -u jdbc:hive2://serverFQDN:10000/demo;ssl=true;sslTrustStore=/opt/jdk/hive.truststore.jks;trustStorePassword=trustPassword;user=testUser;password=testUserPassword
scan complete in 2ms
Connecting to jdbc:hive2://serverFQDN:10000/demo
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://serverFQDN:10000/demo: Invalid status 21 (state=08S01,code=0)
Beeline version 1.1.0-cdh5.14.4 by Apache Hive
beeline&amp;gt; !connect jdbc:hive2://serverFQDN:10000/demo;ssl=true;sslTrustStore=/opt/jdk/hive.truststore.jks;trustStorePassword=trustPassword
Connecting to jdbc:hive2://serverFQDN:10000/demo;ssl=true;sslTrustStore=/opt/jdk/hive.truststore.jks;trustStorePassword=trustPassword
Enter username for jdbc:hive2://serverFQDN:10000/demo;ssl=true;sslTrustStore=/opt/jdk/hive.truststore.jks;trustStorePassword=trustPassword: test_user
Enter password for jdbc:hive2://serverFQDN:10000/demo;ssl=true;sslTrustStore=/opt/jdk/hive.truststore.jks;trustStorePassword=trustPassword: ****************
Connected to: Apache Hive (version 1.1.0-cdh5.14.4)
Driver: Hive JDBC (version 1.1.0-cdh5.14.4)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://serverFQDN:10000/demo&amp;gt; show databases;
INFO  : Compiling command(queryId=hive_20190613081212_d18016a9-24a0-48b4-9023-783382566773): show databases
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database_name, type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling command(queryId=hive_20190613081212_d18016a9-24a0-48b4-9023-783382566773); Time taken: 0.669 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing command(queryId=hive_20190613081212_d18016a9-24a0-48b4-9023-783382566773): show databases
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hive_20190613081212_d18016a9-24a0-48b4-9023-783382566773); Time taken: 0.299 seconds
INFO  : OK
+----------------+--+
| database_name  |
+----------------+--+
| default        |
| demo           |
+----------------+--+
2 rows selected (1.419 seconds)
0: jdbc:hive2://serverFQDN:10000/demo&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 15:33:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91587#M3931</guid>
      <dc:creator>Steve206</dc:creator>
      <dc:date>2019-06-13T15:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Beeline TLS connection string with username and password</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91589#M3932</link>
      <description>&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user= and password= parameters worked once I put the connection string in single quotes ' '.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of what worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[user@serverHostName ~]$ beeline -u 'jdbc:hive2://serverFQDN:10000/demo;ssl=true;sslTrustStore=/opt/jdk/hive.truststore.jks;trustStorePassword=trustPassword;user=testUser;password=testUserPassword'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Double qoutes should work too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 16:47:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Beeline-TLS-connection-string-with-username-and-password/m-p/91589#M3932</guid>
      <dc:creator>Steve206</dc:creator>
      <dc:date>2019-06-13T16:47:41Z</dc:date>
    </item>
  </channel>
</rss>

