<?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 -u &amp;quot;JDBC:hive2://url...&amp;quot; -n username  gives error while beeline  !connect &amp;quot;JDBC:hive2://url...&amp;quot;  works in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Beeline-u-quot-JDBC-hive2-url-quot-n-username-gives-error/m-p/176873#M139123</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11386/gauravmallik12.html" nodeid="11386"&gt;@Gaurav Mallikarjuna&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I tested the same as mine HDP 2.6.1 and could not see any issues&lt;/P&gt;&lt;PRE&gt;[root@dkhdp262c6 ~]# beeline -u "jdbc:hive2://dkhdp263c6.openstacklocal:2181,dkhdp262c6.openstacklocal:2181,dkhdp261c6.openstacklocal:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" -n admin
Connecting to jdbc:hive2://dkhdp263c6.openstacklocal:2181,dkhdp262c6.openstacklocal:2181,dkhdp261c6.openstacklocal:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Connected to: Apache Hive (version 1.2.1000.2.6.1.0-129)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-129)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.1.0-129 by Apache Hive
0: jdbc:hive2://dkhdp263c6.openstacklocal:218&amp;gt; show databases;
+----------------+--+
| database_name  |
+----------------+--+
| default        |
+----------------+--+
1 row selected (0.305 seconds)
0: jdbc:hive2://dkhdp263c6.openstacklocal:218&amp;gt;
&lt;/PRE&gt;&lt;P&gt;This is non Kerberised environment though. &lt;/P&gt;&lt;P&gt;One more thing, I have transport mode set to &lt;STRONG&gt;&lt;EM&gt;binary&lt;/EM&gt;&lt;/STRONG&gt;. What is yours?&lt;/P&gt;&lt;P&gt;If your environment is also non-Kerberised and hive transport mode is &lt;STRONG&gt;&lt;EM&gt;binary&lt;/EM&gt;&lt;/STRONG&gt;, try the following:&lt;/P&gt;&lt;PRE&gt;beeline -u "jdbc:hive2://dkhdp261c6.openstacklocal:10000/" -n admin&lt;/PRE&gt;&lt;P&gt;The above is a hostname where your hiveserver2 is installed + its port number. &lt;/P&gt;&lt;P&gt;Here is how this works my end:&lt;/P&gt;&lt;PRE&gt;[root@dkhdp262c6 ~]# beeline -u "jdbc:hive2://dkhdp261c6.openstacklocal:10000/" -n admin
Connecting to jdbc:hive2://dkhdp261c6.openstacklocal:10000/
Connected to: Apache Hive (version 1.2.1000.2.6.1.0-129)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-129)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.1.0-129 by Apache Hive
0: jdbc:hive2://dkhdp261c6.openstacklocal:100&amp;gt; show databases;
+----------------+--+
| database_name  |
+----------------+--+
| default        |
+----------------+--+
1 row selected (0.29 seconds)
0: jdbc:hive2://dkhdp261c6.openstacklocal:100&amp;gt;
&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Jul 2017 17:46:00 GMT</pubDate>
    <dc:creator>dkozlowski</dc:creator>
    <dc:date>2017-07-10T17:46:00Z</dc:date>
  </channel>
</rss>

