Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Problem when trying to connect to hive server using jdbc


Copy link to this message
-
Re: Problem when trying to connect to hive server using jdbc
Can u try commenting out this section and restart

<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:mysql://FQDN/metastore?createDatabaseIfNotExist=false</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>
From: demian rosas <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Tuesday, April 2, 2013 7:06 PM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Re: Problem when trying to connect to hive server using jdbc

I could not connect to the metastore. The output is this:

hive> show tables;
13/04/02 19:01:14 INFO ql.Driver: <PERFLOG method=Driver.run>
13/04/02 19:01:14 INFO ql.Driver: <PERFLOG method=TimeToSubmit>
13/04/02 19:01:14 INFO ql.Driver: <PERFLOG method=compile>
13/04/02 19:01:14 INFO parse.ParseDriver: Parsing command: show tables
13/04/02 19:01:15 INFO parse.ParseDriver: Parse Completed
13/04/02 19:01:15 INFO ql.Driver: Semantic Analysis Completed
13/04/02 19:01:15 INFO exec.ListSinkOperator: Initializing Self 0 OP
13/04/02 19:01:15 INFO exec.ListSinkOperator: Operator 0 OP initialized
13/04/02 19:01:15 INFO exec.ListSinkOperator: Initialization Done 0 OP
13/04/02 19:01:15 INFO ql.Driver: Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
13/04/02 19:01:15 INFO ql.Driver: </PERFLOG method=compile start=1364954474899 end=1364954475234 duration=335>
13/04/02 19:01:15 INFO ql.Driver: <PERFLOG method=Driver.execute>
13/04/02 19:01:15 INFO ql.Driver: Starting command: show tables
13/04/02 19:01:15 INFO ql.Driver: </PERFLOG method=TimeToSubmit start=1364954474899 end=1364954475247 duration=348>
13/04/02 19:01:15 INFO hive.metastore: Trying to connect to metastore with URI thrift://10.240.81.72:9083<http://10.240.81.72:9083>
13/04/02 19:01:15 WARN hive.metastore: Failed to connect to the MetaStore Server...
13/04/02 19:01:15 INFO hive.metastore: Waiting 1 seconds before next connection attempt.
13/04/02 19:01:16 INFO hive.metastore: Trying to connect to metastore with URI thrift://10.240.81.72:9083<http://10.240.81.72:9083>
13/04/02 19:01:16 WARN hive.metastore: Failed to connect to the MetaStore Server...
13/04/02 19:01:16 INFO hive.metastore: Waiting 1 seconds before next connection attempt.
13/04/02 19:01:17 INFO hive.metastore: Trying to connect to metastore with URI thrift://10.240.81.72:9083<http://10.240.81.72:9083>
13/04/02 19:01:17 WARN hive.metastore: Failed to connect to the MetaStore Server...
13/04/02 19:01:17 INFO hive.metastore: Waiting 1 seconds before next connection attempt.
FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
13/04/02 19:01:18 ERROR exec.Task: FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:1118)
        at org.apache.hadoop.hive.ql.metadata.Hive.databaseExists(Hive.java:1103)
        at org.apache.hadoop.hive.ql.exec.DDLTask.showTables(DDLTask.java:2206)
        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:334)
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:138)
        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1352)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1138)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951)
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:755)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1084)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:51)
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:61)
        at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2140)
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2151)
        at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:1114)
        ... 18 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1082)
        ... 23 more
Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided.