<?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 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/176869#M139119</link>
    <description>&lt;P&gt;When I directly try to connect to hive using Beeline -u "jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2" -n username &lt;/P&gt;&lt;P&gt;CLI throws the following error &lt;/P&gt;&lt;PRE&gt;"Connecting to jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/
17/07/07 18:11:35 [main]: WARN jdbc.HiveConnection: Failed to connect to node03.comp.net:2181
Error: Could not open client transport with JDBC Uri: jdbc:hive2://node03.comp.net:2181/: null (state=08S01,code=0)
Beeline version 1.2.1000.2.6.1.0-129 by Apache Hive"&lt;/PRE&gt;&lt;P&gt;While I just run beeline &amp;lt;enter&amp;gt; and use same jdbc url I'm able to connect.&lt;/P&gt;&lt;PRE&gt;!connect jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2
Connecting to jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2
Enter username for jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2: username
Enter password for jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2:  *********
Connected to: Apache Hive (version 2.1.0.2.6.1.0-129)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-129)
Transaction isolation: TRANSACTION_REPEATABLE_READ&lt;/PRE&gt;&lt;P&gt;Any idea why this is happening. How to fix it? &lt;/P&gt;&lt;P&gt;A bit about our env: &lt;/P&gt;&lt;P&gt;We have Ranger (LDAP) for authorization and also LDAP/AD for Hive authentication. &lt;/P&gt;&lt;P&gt;I plan to use the above commands to launch HQL scripts with parameters like&lt;/P&gt;&lt;P&gt;beeline -u jdbc:hive2://node03.comp.net:2181,node02.comp.net:2181,node01.comp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2 -n xxxx -w pfile -f /home/hdfs/hive_llap/script/test.hql --hivevar db=$dbname&lt;/P&gt;&lt;P&gt;Any help is appreciated, thanks.&lt;/P&gt;</description>
    <pubDate>Sat, 08 Jul 2017 05:42:57 GMT</pubDate>
    <dc:creator>gauravmallik12</dc:creator>
    <dc:date>2017-07-08T05:42:57Z</dc:date>
  </channel>
</rss>

