I do not have that in my xml file. This is the entire hive-site.xml I have,
<configuration> <property> <name>hive.metastore.uris</name> <value>thrift://<hostB>:9057</value> <description>Where the remote metastore server is running.</description> </property> <property> <name>hive.exec.reducers.max</name> <value>150</value> <description>The maximum number of reducers hive queries can take.</description> </property> <property> <name>hive.querylog.location</name> <value>/mnt/tmp/hadoop</value> <description>The location for hive query logs</description> </property> <!-- HiveServer2 Parameters --> <property> <name>hive.server2.thrift.port</name> <value>9890</value> </property> <property> <name>hive.server2.thrift.bind.host</name> <value><hostA></value> </property> <property> <name>mapred.max.split.size</name> <value>256000000</value> </property> <property> <name>mapred.reduce.tasks</name> <value>-1</value> </property> </configuration> On Mon, Oct 19, 2015 at 3:21 PM, Mich Talebzadeh <m...@peridale.co.uk> wrote: > What do you have in your xml file for > > > > <property> > > <name>hive.metastore.sasl.enabled</name> > > <value>false</value> > > <description>If true, the metastore Thrift interface will be secured > with SASL. Clients must authenticate with Kerberos.</description> > > </property> > > > > > > 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 23:05 > > *To:* user@hive.apache.org > *Subject:* Re: Beeline and hiveserver2 > > > > I'm running beeline client from another host. <hostA> in the config above > is the host that has hiveserver2 running and I'm trying to connect to it > from my local machine. > > > > On Mon, Oct 19, 2015 at 3:02 PM, Mich Talebzadeh <m...@peridale.co.uk> > wrote: > > Where are you running beeline client? > > > > From another host or on the same host where hive is installed? > > > > 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 22:33 > *To:* user@hive.apache.org > *Subject:* Re: Beeline and hiveserver2 > > > > 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 > > > > >