dataengref errors

Home / Hive / Metastore

Hive: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

java.lang.RuntimeExceptionUnable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Hive (or Spark with Hive support) could not create a metastore client. The class name is only the wrapper: the "Caused by" lines underneath say whether the metastore service was unreachable or the metastore database could not be opened.

Causes · Fixes · Source

Common causes

  1. hive.metastore.uris points to a metastore service that is down or unreachable.How to confirm: The cause mentions "Could not connect to meta store" or a connection refused on port 9083.
  2. Embedded or local metastore mode cannot open its database: missing JDBC driver, wrong URL or credentials, schema not initialized.How to confirm: The cause mentions JDBC, DataNucleus, or "Version information not found in metastore".
  3. Kerberos or other authentication to the metastore fails.How to confirm: The cause mentions GSS, SASL or "Failed to find any Kerberos tgt".

How to fix it

Point clients at the running metastore service and check it is listening.

SettingDefaultNote
hive.metastore.urisempty (embedded metastore)

For a new metastore database, initialize the schema with schematool, and put the JDBC driver on the classpath.

schematool -dbType mysql -initSchema

Where the message comes from

Message template in the source: Unable to instantiate %s

References

Last checked: