Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B14911DC8 for ; Wed, 21 May 2014 23:16:54 +0000 (UTC) Received: (qmail 4414 invoked by uid 500); 21 May 2014 23:16:50 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 4313 invoked by uid 500); 21 May 2014 23:16:49 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 4306 invoked by uid 99); 21 May 2014 23:16:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 23:16:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dontariq@gmail.com designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vc0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 23:16:45 +0000 Received: by mail-vc0-f180.google.com with SMTP id hy4so3464588vcb.11 for ; Wed, 21 May 2014 16:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=lTrRw01Ruy4XoD+ITi7V91k+VOgBD0VQ2lAAAcMXp+A=; b=RBP6tedoP/CAmRWHnpZueSP2DiY/eUESk2VcSIgRfZgQoqVxYUjDcJe4N2rDmz+HFs o7hASNuPHFcE1NLGSjzuyU4yBZVk5t7I/ltWoWSkG+TYeIRKSz1vtgkGzkoJz57IeVsK RcjblH1MevxXwdixyx+bs+D1mdFdF1Oj6Jm4eTJizvZdxpoYCc0rEXw3vG4WVz8xUQUN 42lPDw3XANRAhMfsEn5TQF7R3vnkyvMCR5mV6dKwMrtVYDNigKqHlggQClYCvIErq64K 02hyOzv2WvtfhUfDlYc94Wp+6KWbmI4Y33BpRbwEFS+4FmfR4HMa+AuugQshbEFCu/jM Iqsg== X-Received: by 10.58.219.166 with SMTP id pp6mr45706833vec.1.1400714183941; Wed, 21 May 2014 16:16:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.244.170 with HTTP; Wed, 21 May 2014 16:15:43 -0700 (PDT) In-Reply-To: References: From: Mohammad Tariq Date: Thu, 22 May 2014 04:45:43 +0530 Message-ID: Subject: Re: Unable to connect Hive using JDBC program To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=047d7bd6c1fa5da59804f9f12f33 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd6c1fa5da59804f9f12f33 Content-Type: text/plain; charset=UTF-8 Could you please show me your code? *Warm regards,* *Mohammad Tariq* *cloudfront.blogspot.com * On Wed, May 21, 2014 at 11:44 PM, Sanjeevv Sriram wrote: > > > When I try to start hive server with out any port, I am getting below > exception > > [cloudera@localhost lib]$ hive --service hiveserver > Starting Hive Thrift Server > 14/05/21 21:20:26 INFO Configuration.deprecation: > mapred.input.dir.recursive is deprecated. Instead, use > mapreduce.input.fileinputformat.input.dir.recursive > 14/05/21 21:20:26 INFO Configuration.deprecation: mapred.max.split.size is > deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize > 14/05/21 21:20:26 INFO Configuration.deprecation: mapred.min.split.size is > deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize > 14/05/21 21:20:26 INFO Configuration.deprecation: > mapred.min.split.size.per.rack is deprecated. Instead, use > mapreduce.input.fileinputformat.split.minsize.per.rack > 14/05/21 21:20:26 INFO Configuration.deprecation: > mapred.min.split.size.per.node is deprecated. Instead, use > mapreduce.input.fileinputformat.split.minsize.per.node > 14/05/21 21:20:26 INFO Configuration.deprecation: mapred.reduce.tasks is > deprecated. Instead, use mapreduce.job.reduces > 14/05/21 21:20:26 INFO Configuration.deprecation: > mapred.reduce.tasks.speculative.execution is deprecated. Instead, use > mapreduce.reduce.speculative > 14/05/21 21:20:26 WARN conf.HiveConf: DEPRECATED: Configuration property > hive.metastore.local no longer has any effect. Make sure to provide a valid > value for hive.metastore.uris if you are connecting to a remote metastore. > org.apache.thrift.transport.TTransportException: Could not create > ServerSocket on address 0.0.0.0/0.0.0.0:10000. > at > org.apache.thrift.transport.TServerSocket.(TServerSocket.java:93) > at > org.apache.thrift.transport.TServerSocket.(TServerSocket.java:75) > at > org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.(TServerSocketKeepAlive.java:34) > at org.apache.hadoop.hive.service.HiveServer.main(HiveServer.java:674) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.apache.hadoop.util.RunJar.main(RunJar.java:212) > > I am attaching hive-site.xml. > > I am using CDH 5 verson. > > Thanks, > Sanjeevv > > > On Wed, May 21, 2014 at 7:40 AM, harish tangella < > harish.tangella@gmail.com> wrote: > >> Hi, >> >> Close the hive terminal and start the new without giving port number >> the command is >> >> hive --service hiveserver don't give any port number hope it will works >> >> On Mon, May 19, 2014 at 11:27 PM, Sanjeevv Sriram wrote: >> >>> I tried with different ports... still I am getting the same issue >>> >>> >>> On Mon, May 19, 2014 at 8:02 AM, harish tangella < >>> harish.tangella@gmail.com> wrote: >>> >>>> Hi, >>>> >>>> >>>> Start Hive server on a different port number,and try to connect using >>>> JDBC connection >>>> >>>> On Mon, May 19, 2014 at 11:06 AM, Shengjun Xin wrote: >>>> >>>>> Can you use command line to connect hive? >>>>> >>>>> >>>>> On Mon, May 19, 2014 at 4:59 AM, Sanjeevv Sriram wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Please help me I am unable to connect Hive using JDBC program. >>>>>> >>>>>> I am getting below exception: >>>>>> >>>>>> Exception in thread "main" java.sql.SQLException: >>>>>> org.apache.thrift.transport.TTransportException: java.net.SocketException: >>>>>> Connection reset >>>>>> at >>>>>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:196) >>>>>> at >>>>>> org.apache.hadoop.hive.jdbc.HiveStatement.execute(HiveStatement.java:132) >>>>>> at >>>>>> org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnection.java:132) >>>>>> at >>>>>> org.apache.hadoop.hive.jdbc.HiveConnection.(HiveConnection.java:122) >>>>>> at >>>>>> org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:106) >>>>>> at java.sql.DriverManager.getConnection(DriverManager.java:571) >>>>>> at java.sql.DriverManager.getConnection(DriverManager.java:215) >>>>>> at com.hivejdbc.Con.main(Con.java:16) >>>>>> >>>>>> >>>>>> My connection program: >>>>>> >>>>>> Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver"); >>>>>> Connection conn = >>>>>> DriverManager.getConnection("jdbc:hive://localhost:10000/poc", "hiveuser1", >>>>>> "hiveuser1"); >>>>>> >>>>>> >>>>>> *I am started Hive thrift server:* >>>>>> $ hive --service hiveserver -p 10000 >>>>>> >>>>>> (tried with ports 10000 ans 10001) >>>>>> >>>>>> >>>>>> >>>>>> *Hive-site.xml* >>>>>> >>>>>> >>>>>> hive.metastore.uris >>>>>> thrift://localhost.localdomain:10000 >>>>>> >>>>>> >>>>>> >>>>>> javax.jdo.option.ConnectionURL >>>>>> >>>>>> jdbc:mysql://localhost:3306/metastore?createDatabaseIfNotExist=true >>>>>> the URL of the MySQL database >>>>>> >>>>>> >>>>>> >>>>>> javax.jdo.option.ConnectionDriverName >>>>>> com.mysql.jdbc.Driver >>>>>> >>>>>> >>>>>> >>>>>> javax.jdo.option.ConnectionUserName >>>>>> hiveuser1 >>>>>> >>>>>> >>>>>> >>>>>> javax.jdo.option.ConnectionPassword >>>>>> hiveuser1 >>>>>> >>>>>> >>>>>> >>>>>> Thanks, >>>>>> Sanjeevv >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Regards >>>>> Shengjun >>>>> >>>> >>>> >>> >> > --047d7bd6c1fa5da59804f9f12f33 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Could you please show me your code?

Warm regards,
Mohammad Tariq


On Wed, May 21, 2014 at 11:44 PM, Sanjee= vv Sriram <sanj2eevv@gmail.com> wrote:


When I try to start hive serve= r with out any port, I am getting below exception

[cloudera@localhos= t lib]$ hive --service hiveserver
Starting Hive Thrift Server
14/05/21 21:20:26 INFO Configuration.deprecation: mapred.input.dir.recursiv= e is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.rec= ursive
14/05/21 21:20:26 INFO Configuration.deprecation: mapred.max.spli= t.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.ma= xsize
14/05/21 21:20:26 INFO Configuration.deprecation: mapred.min.split.size is = deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize
1= 4/05/21 21:20:26 INFO Configuration.deprecation: mapred.min.split.size.per.= rack is deprecated. Instead, use mapreduce.input.fileinputformat.split.mins= ize.per.rack
14/05/21 21:20:26 INFO Configuration.deprecation: mapred.min.split.size.per= .node is deprecated. Instead, use mapreduce.input.fileinputformat.split.min= size.per.node
14/05/21 21:20:26 INFO Configuration.deprecation: mapred.r= educe.tasks is deprecated. Instead, use mapreduce.job.reduces
14/05/21 21:20:26 INFO Configuration.deprecation: mapred.reduce.tasks.specu= lative.execution is deprecated. Instead, use mapreduce.reduce.speculative14/05/21 21:20:26 WARN conf.HiveConf: DEPRECATED: Configuration property=20 hive.metastore.local no longer has any effect. Make sure to provide a=20 valid value for hive.metastore.uris if you are connecting to a remote=20 metastore.
org.apache.thrift.transport.TTransportException: Could not create ServerSoc= ket on address 0= .0.0.0/0.0.0.0:10000.
=C2=A0=C2=A0=C2=A0 at org.apache.thrift.transp= ort.TServerSocket.<init>(TServerSocket.java:93)
=C2=A0=C2=A0=C2=A0 at org.apache.thrift.transport.TServerSocket.<init>= ;(TServerSocket.java:75)
=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.hive.me= tastore.TServerSocketKeepAlive.<init>(TServerSocketKeepAlive.java:34)=
=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.hive.service.HiveServer.main(Hi= veServer.java:674)
=C2=A0=C2=A0=C2=A0 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M= ethod)
=C2=A0=C2=A0=C2=A0 at sun.reflect.NativeMethodAccessorImpl.invoke= (NativeMethodAccessorImpl.java:57)
=C2=A0=C2=A0=C2=A0 at sun.reflect.Del= egatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
=C2=A0=C2=A0=C2=A0 at java.lang.reflect.Method.invoke(Method.java:606)
= =C2=A0=C2=A0=C2=A0 at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
I am attaching hive-site.xml.

I am using CDH 5 ve= rson.

Thanks,
Sanjeevv


On Wed, May 21,= 2014 at 7:40 AM, harish tangella <harish.tangella@gmail.com&g= t; wrote:
Hi,
=C2=A0
=C2=A0 Close the hive terminal and start the new without giving port n= umber the command is
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
hive --service hiveserver don't give any port number hope it will = works

On Mon, May 19, 2014 at 11:27 PM, Sanjeevv Srira= m <sanj2eevv@gmail.com> wrote:
I tried with different ports... still I am getting the sam= e issue


On Mon, May 19, 2014 at 8:02 AM, harish tangella= <harish.tangella@gmail.com> wrote:
Hi,
=C2=A0
=C2=A0
Start Hive server on a different port number,and try to connect using = JDBC connection

On Mon, May 19, 2014 at 11:06 AM, Shengjun Xin <= span dir=3D"ltr"><sxin@gopivotal.com> wrote:
Can you use command = line to connect hive?


On Mon, May 19, 2014 at 4:59 AM, Sanjeevv Sriram= <sanj2eevv@gmail.com> wrote:
Hi,

Please help me I am unable to connect Hive using JDBC= program.

I am getting below exception:

Exception in th= read "main" java.sql.SQLException: org.apache.thrift.transport.TT= ransportException: java.net.SocketException: Connection reset
=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuer= y(HiveStatement.java:196)
=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.hive.j= dbc.HiveStatement.execute(HiveStatement.java:132)
=C2=A0=C2=A0=C2=A0 at = org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection(HiveConnecti= on.java:132)
=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.hive.jdbc.HiveConnection.<init&g= t;(HiveConnection.java:122)
=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.hive= .jdbc.HiveDriver.connect(HiveDriver.java:106)
=C2=A0=C2=A0=C2=A0 at java= .sql.DriverManager.getConnection(DriverManager.java:571)
=C2=A0=C2=A0=C2=A0 at java.sql.DriverManager.getConnection(DriverManager.ja= va:215)
=C2=A0=C2=A0=C2=A0 at com.hivejdbc.Con.main(Con.java:16)

=

My connection program:

=C2=A0 Class.forName("org.apache.ha= doop.hive.jdbc.HiveDriver");
=C2=A0 Connection conn =3D DriverManag= er.getConnection("jdbc:hive://localhost:10000/poc", "hiveuse= r1", "hiveuser1");


I am started Hive thrift server:
$ hive --service hiveserver= -p 10000

(tried with ports 10000 ans 10001)



Hive-site.xml

<property>
=C2=A0=C2=A0=C2=A0 <name>hive.metastore.= uris</name>
=C2=A0=C2=A0=C2=A0 <value>thrift://localhost.loc= aldomain:10000</value>
=C2=A0 </property>

<propert= y>
<name>javax.jdo.option.ConnectionURL</name>
=C2=A0 <value>jdbc:mysql://localhost:3306/metastore?createDatabaseIfN= otExist=3Dtrue</value>
=C2=A0 <description>the URL of the My= SQL database</description>
</property>

<property&g= t;
=C2=A0 <name>javax.jdo.option.ConnectionDriverName</name>=
=C2=A0 <value>com.mysql.jdbc.Driver</value>
</property>= ;

<property>
=C2=A0 <name>javax.jdo.option.Connection= UserName</name>
=C2=A0 <value>hiveuser1</value>
<= ;/property>

<property>
=C2=A0 <name>javax.jdo.option.ConnectionPassw= ord</name>
=C2=A0 <value>hiveuser1</value>
</pro= perty>


Thanks,
Sanjeevv
=



--
Regards
Shengjun
<= /div>

=



--047d7bd6c1fa5da59804f9f12f33--