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 <sanj2e...@gmail.com>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.tange...@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 <s...@gopivotal.com>wrote: >> >>> Can you use command line to connect hive? >>> >>> >>> On Mon, May 19, 2014 at 4:59 AM, Sanjeevv Sriram <sanj2e...@gmail.com>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.<init>(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* >>>> >>>> <property> >>>> <name>hive.metastore.uris</name> >>>> <value>thrift://localhost.localdomain:10000</value> >>>> </property> >>>> >>>> <property> >>>> <name>javax.jdo.option.ConnectionURL</name> >>>> >>>> <value>jdbc:mysql://localhost:3306/metastore?createDatabaseIfNotExist=true</value> >>>> <description>the URL of the MySQL database</description> >>>> </property> >>>> >>>> <property> >>>> <name>javax.jdo.option.ConnectionDriverName</name> >>>> <value>com.mysql.jdbc.Driver</value> >>>> </property> >>>> >>>> <property> >>>> <name>javax.jdo.option.ConnectionUserName</name> >>>> <value>hiveuser1</value> >>>> </property> >>>> >>>> <property> >>>> <name>javax.jdo.option.ConnectionPassword</name> >>>> <value>hiveuser1</value> >>>> </property> >>>> >>>> >>>> Thanks, >>>> Sanjeevv >>>> >>> >>> >>> >>> -- >>> Regards >>> Shengjun >>> >> >> >