Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error in hive metadata: org.apache.thrift.transport.TTransportException: java.net

Tags:

hadoop

hive

I am using hive-0.9.0 with mysql as a metastore. I am getting one exception as :

hive> show tables;
FAILED: Error in metadata: org.apache.thrift.transport.TTransportException:java.net.SocketTimeoutException:Read timed out

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask 
Error in metadata: MetaException(message:Could not connect to meta store using any of the URIs provided)  

Any pointers on to would be helpful.

Regards Neeraj

like image 640
neeraj Avatar asked Nov 03 '12 08:11

neeraj


2 Answers

Did you configure the URL & credential for metastore correctly? Did you try restart your metastore service by

hive --service metastore

like image 190
eric-haibin-lin Avatar answered Sep 29 '22 03:09

eric-haibin-lin


pls check your hive config ${HIVE_HOME}/conf/hive-site.xml

hive mysql configuration example:

<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
</property>

<property>
  <name>javax.jdo.option.ConnectionDriverName</name>
  <value>com.mysql.jdbc.Driver</value>
</property>

<property>
  <name>javax.jdo.option.ConnectionUserName</name>
  <value>hive</value>
</property>

<property>
  <name>javax.jdo.option.ConnectionPassword</name>
  <value>hive</value>
</property>
like image 32
pensz Avatar answered Sep 29 '22 02:09

pensz