Hive data source connectivity issue

I am trying to connect with hive and getting some failure while configuring source [Hive].Capture

Hi @abhba,

Can you check at the server.log for the ERROR messages while trying to add the hive source.

Are you able to connect with Storage Based Authorization?

Provide me the log file once to check

@Venugopal_Menda

I am pasting the log file just let me know if this is the kerberos issue .

at com.dremio.concurrent.RenamingRunnable.run(RenamingRunnable.java:36) [dremio-common-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
at com.dremio.concurrent.SingletonRunnable.run(SingletonRunnable.java:41) [dremio-common-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
at com.dremio.concurrent.SafeRunnable.run(SafeRunnable.java:40) [dremio-common-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
at com.dremio.concurrent.Runnables$1.run(Runnables.java:45) [dremio-common-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147) ~[na:1.8.0_191]
at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:122) ~[na:1.8.0_191]
at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187) ~[na:1.8.0_191]
at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:224) ~[na:1.8.0_191]
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212) ~[na:1.8.0_191]
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179) ~[na:1.8.0_191]
at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192) ~[na:1.8.0_191]
… 27 common frames omitted
2019-03-28 08:53:26,484 [Plugin Startup: Hive] ERROR o.a.thrift.transport.TSaslTransport - SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed
at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211) ~[na:1.8.0_191]
at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) [libthrift-0.9.3.jar:0.9.3]
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) ~[libthrift-0.9.3.jar:0.9.3]
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) [libthrift-0.9.3.jar:0.9.3]
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52) [dremio-hive-exec-shaded-3.1.7-201903210426240688-c843b51.jar
:3.1.7-201903210426240688-c843b51]
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49) [dremio-hive-exec-shaded-3.1.7-201903210426240688-c843b51.jar
:3.1.7-201903210426240688-c843b51]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at javax.security.auth.Subject.doAs(Subject.java:422) [na:1.8.0_191]
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1836) [hadoop-common-2.8.3.jar:na]
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49) [dremio-hive-exec-shaded-3.1.7-201903210426240688-c843b51.jar:
3.1.7-201903210426240688-c843b51]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:477) [hive-metastore-2.1.1-dremio-201811301814460298-e73bd7f.jar:2.1.1-dre
mio-201811301814460298-e73bd7f]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.(HiveMetaStoreClient.java:285) [hive-metastore-2.1.1-dremio-201811301814460298-e73bd7f.jar:2.1.1-d
remio-201811301814460298-e73bd7f]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.(HiveMetaStoreClient.java:210) [hive-metastore-2.1.1-dremio-201811301814460298-e73bd7f.jar:2.1.1-d
remio-201811301814460298-e73bd7f]
at com.dremio.exec.store.hive.HiveClient$1.run(HiveClient.java:148) [dremio-hive-plugin-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
at com.dremio.exec.store.hive.HiveClient$1.run(HiveClient.java:145) [dremio-hive-plugin-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
at com.dremio.exec.store.hive.HiveClient$9.run(HiveClient.java:321) [dremio-hive-plugin-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_191]
at javax.security.auth.Subject.doAs(Subject.java:422) [na:1.8.0_191]
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1836) [hadoop-common-2.8.3.jar:na]
at com.dremio.exec.store.hive.HiveClient.doAsCommand(HiveClient.java:318) [dremio-hive-plugin-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843
b51]
at com.dremio.exec.store.hive.HiveClient.connect(HiveClient.java:144) [dremio-hive-plugin-3.1.7-201903210426240688-c843b51.jar:3.1.7-201903210426240688-c843b51]

I am able to connect to hive source and also able to see the tables. However when I run a query against hive, the following error is popping up:

Access denied reading dataset quadhive.“default”.amazon_s3.
“quadhive” is the source name of “hive”

2019-05-16 10:48:06,615 [qtp882402449-139] INFO c.d.e.catalog.ManagedStoragePlugin - User Error Occurred [ErrorId: 7cc8b110-c592-4a76-8eb5-05abb1e89ae8]
com.dremio.common.exceptions.UserException: Access denied reading dataset quadhive.“default”.amazon_s3.
at com.dremio.common.exceptions.UserException$Builder.build(UserException.java:746) ~[dremio-common-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.exec.catalog.ManagedStoragePlugin.checkAccess(ManagedStoragePlugin.java:389) [dremio-sabot-kernel-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.exec.catalog.DatasetManager.getTableFromPlugin(DatasetManager.java:316) [dremio-sabot-kernel-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.exec.catalog.DatasetManager.getTable(DatasetManager.java:191) [dremio-sabot-kernel-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.exec.catalog.CatalogImpl.getTable(CatalogImpl.java:128) [dremio-sabot-kernel-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.exec.catalog.DelegatingCatalog.getTable(DelegatingCatalog.java:59) [dremio-sabot-kernel-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.exec.catalog.CachingCatalog.getTable(CachingCatalog.java:66) [dremio-sabot-kernel-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at sun.reflect.GeneratedMethodAccessor523.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1287) [hk2-utils-2.5.0-b32.jar:na]
at org.jvnet.hk2.internal.MethodInterceptorImpl.internalInvoke(MethodInterceptorImpl.java:109) [hk2-locator-2.5.0-b32.jar:na]
at org.jvnet.hk2.internal.MethodInterceptorImpl.invoke(MethodInterceptorImpl.java:125) [hk2-locator-2.5.0-b32.jar:na]
at org.jvnet.hk2.internal.MethodInterceptorInvocationHandler.invoke(MethodInterceptorInvocationHandler.java:62) [hk2-locator-2.5.0-b32.jar:na]
at com.sun.proxy.$Proxy118.getTable(Unknown Source) [na:na]
at com.dremio.dac.explore.DatasetsResource.getDatasetSummary(DatasetsResource.java:270) [dremio-dac-backend-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.dac.explore.DatasetsResource.newUntitled(DatasetsResource.java:141) [dremio-dac-backend-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at com.dremio.dac.explore.DatasetsResource.newUntitledFromParent(DatasetsResource.java:208) [dremio-dac-backend-3.1.8-201903290151120189-36bb2bf.jar:3.1.8-201903290151120189-36bb2bf]
at sun.reflect.GeneratedMethodAccessor583.invoke(Unknown Source) ~[na:na]

Any help is very much appreciated on how to resolve this issue.

Can you please show me the query what u have written ??

Abhay
Thank you for your response.

I cannot see the query since the message pops up right after I click on the table name in the hive source. Please see attached the screen shots.

Just as an FYI, “root” is how I started the dremio server and “admin” is the user in dremio

Interestingly, If I start the dremio server as “dremio” and use userid “dremio” for logging into dremio user interface, then the hive tables queries are working.

Thank you very much for your help

Anil