You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Charles Henry <ch...@snaplogic.com> on 2018/03/27 23:45:40 UTC

TException while fetching table.. Cause : org.apache.thrift.transport.TTransportException

Hi folks,

We're working with Hadoop and Hive Metastore, and we're trying to
authenticate with Kerberos.  We're using hive-metastore-1.2.1.spark.jar

For reasons lost to the ancients, we don't support SASL plus Kerberos, so
HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL is false.
we also leave METASTORE_USE_THRIFT_FRAMED_TRANSPORT as false
and METASTORE_USE_THRIFT_COMPACT_PROTOCOL as false

This means we are continuing with a TBinaryProtocol

I debug the flow, and I see a few things of note:

1: The HiveMetastoreClient says that we are connected. It makes an attempt
to set userGroupInformation with Utils.getUGI and we get a WARN :

set_ugi() not successful, Likely cause: new client talking to old server.
Continuing without it.

(This is maybe less relevant)


2: The HiveMetastoreClient appears to be connected, and peforms a
snapshotActiveConf() call, then logs a message: "Connected top metastore"


3: However, when the HCatClientHMSImpl.getTable(String dbName, String
tableName) is called,

we fail on line 164:


this.hmsClient.getTable(this.checkDB(dbname), tableName);


And in fact the exception thrown is

ConnectionFailureException("TException while fetching table", var7)


The dbName and tableName are both valid.  but this appears to be a
connectivity Exception, as we did NOT receive a NoSuchObjectException.  I
will paste the stack trace below.  If anyone can help, that would be
awesome!  I can't find any existing information for this scenario.  I've
been searching for quite some time. Thanks all


Caused by: org.apache.hive.hcatalog.common.HCatException : 9001 : Exception
occurred while processing HCat request : TException while fetching table..
Cause : org.apache.thrift.transport.TTransportException at
org.apache.hive.hcatalog.api.HCatClientHMSImpl.getTable(HCatClientHMSImpl.java:201)
at
com.snaplogic.snaps.hadoop.RCSnapUtil.getHiveSchemas(RCSnapUtil.java:371)
... 21 more Caused by: org.apache.thrift.transport.TTransportException at
org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) at
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
at
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
at
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) at
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_table(ThriftHiveMetastore.java:1218)
at
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_table(ThriftHiveMetastore.java:1204)
at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTable(HiveMetaStoreClient.java:1208)
at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:152)
at com.sun.proxy.$Proxy125.getTable(Unknown Source) at
org.apache.hive.hcatalog.api.HCatClientHMSImpl.getTable(HCatClientHMSImpl.java:191)
... 22 more





-- 
Charles Henry
Sr. Software Engineer Snaps Team
chenry@snaplogic.com

*SnapLogic Inc | 1825 South Grant Street, 5th Floor | San Mateo CA 94402 |
USA*

This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received it by mistake, please let us know by e-mail reply and delete it
from your system; you may not copy this message or disclose its contents to
anyone. The integrity and security of this message cannot be guaranteed on
the Internet.