<?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: Accessing Hive through Knox receiving HTTP 401 error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385128#M245630</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/82698"&gt;@smruti&lt;/a&gt;&amp;nbsp;This is a new setup. I tried regenerating Hive keytab but still no luck.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2024 14:21:37 GMT</pubDate>
    <dc:creator>Hadoop16</dc:creator>
    <dc:date>2024-03-18T14:21:37Z</dc:date>
    <item>
      <title>Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385064#M245610</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;I have a kerberized hadoop cluster. Installed knox in kubernetes container with its keytab. Configured knox topology with shiro provider and ldap authentication. I'm able to access webhdfs fine with ldap credentials but Hive is failing with HTTP 401 error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Knox is configured with self-signed cert and hive is not configured with SSL.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;topology.xml -- Configured with shiro provider and ldap info&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;service&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;role&amp;gt;WEBHDFS&amp;lt;/role&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;url&amp;gt;&lt;A href="http://name1_hostname:50070/webhdfs" target="_blank" rel="noopener"&gt;http://name1_hostname:50070/webhdfs&lt;/A&gt;&amp;lt;/url&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;url&amp;gt;&lt;A href="http://name12_hostname:50070/webhdfs" target="_blank" rel="noopener"&gt;http://name12_hostname:50070/webhdfs&lt;/A&gt;&amp;lt;/url&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;/service&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;service&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;role&amp;gt;HIVE&amp;lt;/role&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;url&amp;gt;http://&amp;lt;host_name&amp;gt;:10004/cliservice&amp;lt;/url&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;param&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;name&amp;gt;replayBufferSize&amp;lt;/name&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;value&amp;gt;8&amp;lt;/value&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;/param&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;&amp;lt;/service&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Configured hive-site.xml with below configs in HS2 host&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hive.server2.thrift.http.port = 10004&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hive.server2.thrift.http.path = cliservice&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hive.server2.transport.mode = http&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hive.server2.allow.user.substitution = true&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Configured core-site.xml with below configs in Namenode hosts and HS2 host&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hadoop.proxyuser.knox.groups = *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hadoop.proxyuser.knox.hosts = * &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hadoop.proxyuser.hive.hosts = *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;hadoop.proxyuser.hive.groups = *&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Hive beeline string&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;beeline -u "jdbc:hive2://Knox-hostname:8443/;ssl=true;sslTrustStore=/tmp/gateway.jks;trustStorePassword=knoxpass;transportMode=http;httpPath=gateway/default/hive" -n &amp;lt;username&amp;gt; -p&amp;lt;password&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;ERROR jdbc.HiveConnection: Error opening session&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;org.apache.thrift.transport.TTransportException: HTTP Response code: 401&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:262) ~[hive-exec-2.3.6.jar:2.3.6]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:313) ~[hive-exec-2.3.6.jar:2.3.6]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;In hiveserver2.log&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;2024-03-15T19:28:32,967 ERROR [HiveServer2-HttpHandler-Pool: Thread-363] thrift.ThriftHttpServlet: Failed to authenticate with hive/_HOST kerberos principal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;2024-03-15T19:28:32,967 ERROR [HiveServer2-HttpHandler-Pool: Thread-363] thrift.ThriftHttpServlet: Error:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;org.apache.hive.service.auth.HttpAuthenticationException: java.lang.reflect.UndeclaredThrowableException&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doKerberosAuth(ThriftHttpServlet.java:407) ~[hive-service-2.3.6.jar:2.3.6]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Caused by: org.apache.hive.service.auth.HttpAuthenticationException: Authorization header received from the client is empty.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.getAuthHeader(ThriftHttpServlet.java:548) ~[hive-service-2.3.6.jar:2.3.6]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.access$100(ThriftHttpServlet.java:74) ~[hive-service-2.3.6.jar:2.3.6]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Caused by: org.apache.hive.service.auth.HttpAuthenticationException: Kerberos authentication failed:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction.run(ThriftHttpServlet.java:463) ~[hive-service-2.3.6.jar:2.3.6]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Caused by: org.ietf.jgss.GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:858) ~[?:1.8.0_352]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:342) ~[?:1.8.0_352]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Am I missing anything? Any help is appreciated and thanks in advance!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 20:16:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385064#M245610</guid>
      <dc:creator>Hadoop16</dc:creator>
      <dc:date>2024-03-15T20:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385071#M245612</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109626"&gt;@Hadoop16&lt;/a&gt;&amp;nbsp; Make sure "HiveServer2 Transport mode" is set to HTTP in hive configs&lt;/P&gt;&lt;P&gt;Refer below doc for more info&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/cdw-runtime/1.5.1/securing-hive/topics/hive_secure_knox.html" target="_blank"&gt;https://docs.cloudera.com/cdw-runtime/1.5.1/securing-hive/topics/hive_secure_knox.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 07:53:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385071#M245612</guid>
      <dc:creator>Scharan</dc:creator>
      <dc:date>2024-03-16T07:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385076#M245613</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35149"&gt;@Scharan&lt;/a&gt;&amp;nbsp;&lt;SPAN&gt;hive.server2.transport.mode is already set to http.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 23:46:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385076#M245613</guid>
      <dc:creator>Hadoop16</dc:creator>
      <dc:date>2024-03-16T23:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385096#M245614</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109626"&gt;@Hadoop16&lt;/a&gt;&amp;nbsp;Was it working before? Did anything change from Kerberos point of view? Try regenerating the hive keytab file and see if it helps.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 16:40:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385096#M245614</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2024-03-17T16:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385128#M245630</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/82698"&gt;@smruti&lt;/a&gt;&amp;nbsp;This is a new setup. I tried regenerating Hive keytab but still no luck.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 14:21:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385128#M245630</guid>
      <dc:creator>Hadoop16</dc:creator>
      <dc:date>2024-03-18T14:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385206#M245651</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109626"&gt;@Hadoop16&lt;/a&gt;&amp;nbsp; Is the hive HTTP principal regenerated? If not, Can you regenerate the HTTP principal for the hive service?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 04:14:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385206#M245651</guid>
      <dc:creator>Scharan</dc:creator>
      <dc:date>2024-03-20T04:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive through Knox receiving HTTP 401 error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385755#M245814</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35149"&gt;@Scharan&lt;/a&gt;&amp;nbsp;Thanks! I figured out the issue, following properties were not configured in hive-site&lt;BR /&gt;&lt;SPAN&gt;hive.server2.authentication.spnego.keytab&lt;BR /&gt;hive.server2.authentication.spnego.principal&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 06:21:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Accessing-Hive-through-Knox-receiving-HTTP-401-error/m-p/385755#M245814</guid>
      <dc:creator>Hadoop16</dc:creator>
      <dc:date>2024-03-30T06:21:13Z</dc:date>
    </item>
  </channel>
</rss>

