2
votes

Hive shell is getting started but whenever i hit any command in shell, say
hive> show databases;

i am getting following error:

FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

My JPS is like this: /apache-hive-2.3.0-bin/conf$ jps
3779 ResourceManager
3540 SecondaryNameNode
3909 NodeManager
3384 DataNode
6856 Jps
3257 NameNode
am getting this gerror?

My SQL Server is also running. Checked it using netstat -an|grep 3306, What could be wrong here?

Struggling for days now.

1

1 Answers

1
votes

I'm not sure if you figured this out or not but here are the steps I took to help me fix this error (note: I wasn't worried about losing my old schema, you may be):

  1. Make sure your cluster is shut down properly stop-dfs.sh, stop-yarn.sh.
  2. Move metadata_db mv /home/user/metadata_db /home/user/metadata_db.tmp.
  3. Shut down your system and start it up again.
  4. Start up your cluster start-dfs.sh, start-yarn.sh
  5. Reinitialize schema with $HIVE_HOME/bin/schematool -initSchema -dbType derby.
  6. Start hive $HIVE_HOME/bin/hive.

Hope this helps someone.