<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Unable to connect to Kerberized cluster running Hive from R in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/57049#M64083</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if anyone else faced this issue, but after much research I was able to connect to Kerberized Hive successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appended&amp;nbsp;"-Djavax.security.auth.useSubjectCredsOnly=false" to the&amp;nbsp;"jinit"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.jinit(classpath=cp, parameters="-Djavax.security.auth.useSubjectCredsOnly=false")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, it disables the requirement of a GSS mechanism to obtain necessary credentials from an existing Subject and allows to use the specified authentication mechanism, which in this case is Kerberos.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2017 16:57:02 GMT</pubDate>
    <dc:creator>MGarg</dc:creator>
    <dc:date>2017-07-06T16:57:02Z</dc:date>
    <item>
      <title>Unable to connect to Kerberized cluster running Hive from R</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/56778#M64081</link>
      <description>&lt;P&gt;I am trying to access Hive tables from R by using JDBC, but it's failing while establishing the connection for&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;org.apache.hadoop.security.UserGroupInformation&lt;/PRE&gt;&lt;P&gt;I thought "hadoop-core.jar" would provide this class, but it's still failing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does someone have any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;library("DBI")&lt;BR /&gt;library("rJava")&lt;BR /&gt;library("RJDBC")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;cp = c("/home/cdsw/impala_jars/hadoop-common.jar", "/home/cdsw/hive_jars/libthrift-0.9.0.jar",&lt;BR /&gt;"/home/cdsw/hive_jars/hive_service.jar", "/home/cdsw/hive_jars/hadoop-core.jar",&lt;BR /&gt;"/home/cdsw/hive_jars/TCLIServiceClient.jar", "hive_jars/hive-jdbc-1.1.0-cdh5.10.1-standalone.jar")&lt;/P&gt;&lt;P&gt;.jinit(classpath=cp)&lt;/P&gt;&lt;P&gt;for(l in list.files('/home/cdsw/hive_jars')){ .jaddClassPath(paste("/home/cdsw/hive_jars",l,sep=""))}&lt;BR /&gt;for(l in list.files('/home/cdsw/impala_jars')){ .jaddClassPath(paste("/home/cdsw/impala_jars",l,sep=""))}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;.jclassPath()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;drv &amp;lt;- JDBC("org.apache.hive.jdbc.HiveDriver", "hive_jars/hive-jdbc-1.1.0-cdh5.10.1-standalone.jar", identifier.quote="`")&lt;/P&gt;&lt;P&gt;con &amp;lt;- dbConnect(drv, "jdbc:hive2://localhost:10000/default;principal=hive/{HOST}@{REALM}")&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 13:28:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/56778#M64081</guid>
      <dc:creator>MGarg</dc:creator>
      <dc:date>2026-04-21T13:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Kerberized cluster running Hive from R</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/56780#M64082</link>
      <description>&lt;P&gt;Here's an update:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to fix the initial issue by adding all the jars in /opt/cloudera/parcels/CDH/... directory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, now it's failing with Kerberos TGT not found error, although I am doing kinit before connecting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something I am missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;PRE&gt;javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]&lt;/PRE&gt;&lt;P&gt;"&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 21:55:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/56780#M64082</guid>
      <dc:creator>MGarg</dc:creator>
      <dc:date>2017-06-30T21:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Kerberized cluster running Hive from R</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/57049#M64083</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if anyone else faced this issue, but after much research I was able to connect to Kerberized Hive successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appended&amp;nbsp;"-Djavax.security.auth.useSubjectCredsOnly=false" to the&amp;nbsp;"jinit"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.jinit(classpath=cp, parameters="-Djavax.security.auth.useSubjectCredsOnly=false")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, it disables the requirement of a GSS mechanism to obtain necessary credentials from an existing Subject and allows to use the specified authentication mechanism, which in this case is Kerberos.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 16:57:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Unable-to-connect-to-Kerberized-cluster-running-Hive-from-R/m-p/57049#M64083</guid>
      <dc:creator>MGarg</dc:creator>
      <dc:date>2017-07-06T16:57:02Z</dc:date>
    </item>
  </channel>
</rss>

