But I don't have anything in my hive-site.xml file that has username and
password but `beeline -u jdbc:hive2://` still works

On Mon, Oct 19, 2015 at 1:04 PM, Mich Talebzadeh <m...@peridale.co.uk>
wrote:

> You need to pass username and password. For example assuming the OS
> username is hduser and password is xxxx
>
>
>
> beeline -u jdbc:hive2://rhes564:10010/default
> org.apache.hive.jdbc.HiveDriver -n hduser -p xxxx
>
>
>
>
>
>
>
> Mich Talebzadeh
>
>
>
> *Sybase ASE 15 Gold Medal Award 2008*
>
> A Winning Strategy: Running the most Critical Financial Data on ASE 15
>
>
> http://login.sybase.com/files/Product_Overviews/ASE-Winning-Strategy-091908.pdf
>
> Author of the books* "A Practitioner’s Guide to Upgrading to Sybase ASE
> 15", ISBN 978-0-9563693-0-7*.
>
> co-author *"Sybase Transact SQL Guidelines Best Practices", ISBN
> 978-0-9759693-0-4*
>
> *Publications due shortly:*
>
> *Complex Event Processing in Heterogeneous Environments*, ISBN:
> 978-0-9563693-3-8
>
> *Oracle and Sybase, Concepts and Contrasts*, ISBN: 978-0-9563693-1-4, volume
> one out shortly
>
>
>
> http://talebzadehmich.wordpress.com
>
>
>
> NOTE: The information in this email is proprietary and confidential. This
> message is for the designated recipient only, if you are not the intended
> recipient, you should destroy it immediately. Any information in this
> message shall not be understood as given or endorsed by Peridale Technology
> Ltd, its subsidiaries or their employees, unless expressly so stated. It is
> the responsibility of the recipient to ensure that this email is virus
> free, therefore neither Peridale Ltd, its subsidiaries nor their employees
> accept any responsibility.
>
>
>
> *From:* Jerrick Hoang [mailto:jerrickho...@gmail.com]
> *Sent:* 19 October 2015 20:37
> *To:* user@hive.apache.org
> *Subject:* Beeline and hiveserver2
>
>
>
> Hi all,
>
>
>
> I'm trying to connect o HiveServer2 by using beeline client,
>
>
>
> When I do
>
> `/usr/local/hive/bin/beeline -u jdbc:hive2://<hostA>:9890`, I got
>
>
>
> `Error: Failed to open new session: java.lang.RuntimeException:
> java.lang.RuntimeException:
> org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException):
> User: product is not allowed to impersonate anonymous (state=,code=0)
>
> Beeline version 2.0.0-SNAPSHOT by Apache Hive`
>
>
>
> Also when I do,
>
> `/usr/local/hive/bin/beeline -u jdbc:hive2://<hostA>:9890 -n product`,
>
>
>
> I also got
>
>
>
> `Error: Failed to open new session: java.lang.RuntimeException:
> java.lang.RuntimeException:
> org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException):
> User: product is not allowed to impersonate product (state=,code=0)
>
> Beeline version 2.0.0-SNAPSHOT by Apache Hive`
>
>
>
> But when I put all the necessary information in a hive-site.xml
>
>
>
>     <property>
>
>       <name>hive.server2.thrift.port</name>
>
>       <value>9890</value>
>
>     </property>
>
>     <property>
>
>       <name>hive.server2.thrift.bind.host</name>
>
>       <value><hostA></value>
>
>     </property>
>
>
>
> And do export HIVE_CONF_DIR=<path to hive-site.xml>, then run
>
>
>
> `/usr/local/hive/bin/beeline -u jdbc:hive2://`
>
>
>
> Anyone knows what's going on?
>
>
>
> It was able to connect to the correct hiveserver2 (I can run queries
> against it). I don't have any authentication setup (as far as I know) on
> the Hiveserver2 side. Besides I am able to connect to it just fine using
> the hacky method described above. Although I would like to connect to it in
> code (using a java jdbc client) so the hacky method won't work.
>
>
>
>
>
>
>
> Thanks!
>
> Jerrick
>

Reply via email to