<?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 JDBC/webHDFS through Knox in secured cluster (kerberos) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113193#M42741</link>
    <description>&lt;P&gt;Hi everyone, I am facing same issue connecting to Hive HTTP through Knox. On Knox gateway logs, I have:&lt;/P&gt;&lt;P&gt;access|uri|/gateway/default/hive/?op=LISTSTATUS|success|Response status: 401&lt;/P&gt;&lt;P&gt;@mliem: have you fixed your problem and if so, can you please tell me how ?&lt;/P&gt;&lt;P&gt;FYI, connecting directly to Hive HTTP with beeline and same crendentials works fine.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
    <pubDate>Wed, 23 May 2018 19:45:55 GMT</pubDate>
    <dc:creator>mister_letaz</dc:creator>
    <dc:date>2018-05-23T19:45:55Z</dc:date>
    <item>
      <title>Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113187#M42735</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to access hive JDBC through Knox in a secured cluster (kerberos). When accessing them directly, it works fine.&lt;/P&gt;&lt;P&gt;I am able to connect with hiveserver directly in HTTP mode passing in kerbeos principal and creating kerberos ticket&lt;/P&gt;&lt;P&gt;beeline -u 'jdbc:hive2:/&amp;lt;hive_server&amp;gt;:10001/;transportMode=http;httpPath=cliservice;principal=hive/_HOST@DEV.COM'&lt;/P&gt;&lt;P&gt;and access WEBHDFS fine directly connecting to namenode:&lt;/P&gt;&lt;P&gt;curl -i --negotiate -u : 'http://&amp;lt;namenode&amp;gt;:50070/webhdfs/v1/?op=LISTSTATUS'&lt;/P&gt;&lt;P&gt;Going through Knox gateway (using sample LDAP for simplicity), I get:&lt;/P&gt;&lt;P&gt;curl -iku guest:guest-password -X GET 'https://&amp;lt;knox_gateway&amp;gt;:8443/gateway/default/webhdfs/v1/?op=LISTSTATUS'&lt;/P&gt;&lt;PRE&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/&amp;gt;
&amp;lt;title&amp;gt;Error 401 Authentication required&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;HTTP ERROR 401&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;Problem accessing /webhdfs/v1/. 

Reason:&amp;lt;pre&amp;gt;    Authentication required&amp;lt;/pre&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;hr/&amp;gt;&amp;lt;i&amp;gt;&amp;lt;small&amp;gt;Powered by Jetty://&amp;lt;/small&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;br/&amp;gt;   &lt;/PRE&gt;&lt;P&gt;In gateway-audit i do see the request getting translated to the actual internal request but its returning 401.&lt;/P&gt;&lt;P&gt;audit|WEBHDFS||||access|uri|/gateway/default/webhdfs/v1/?op=LISTSTATUS|unavailable|Request method: GET&lt;/P&gt;&lt;P&gt;audit|WEBHDFS|guest|||authentication|uri|/gateway/default/webhdfs/v1/?op=LISTSTATUS|success|&lt;/P&gt;&lt;P&gt;audit|WEBHDFS|guest|||authentication|uri|/gateway/default/webhdfs/v1/?op=LISTSTATUS|success|Groups: []&lt;/P&gt;&lt;P&gt;audit|WEBHDFS|guest|||authorization|uri|/gateway/default/webhdfs/v1/?op=LISTSTATUS|success|&lt;/P&gt;&lt;P&gt;audit|WEBHDFS|guest|||dispatch|uri|http://&amp;lt;name_node&amp;gt;:50070/webhdfs/v1/?op=LISTSTATUS&amp;amp;doAs=guest|unavailable|Request method: GET&lt;/P&gt;&lt;P&gt;audit|WEBHDFS|guest|||dispatch|uri|http://&amp;lt;name_node&amp;gt;:50070/webhdfs/v1/?op=LISTSTATUS&amp;amp;doAs=guest|success|Response status: 401&lt;/P&gt;&lt;P&gt;audit|WEBHDFS|guest|||access|uri|/gateway/default/webhdfs/v1/?op=LISTSTATUS|success|Response status: 401&lt;/P&gt;&lt;P&gt;Similarly in Hive, I can connect to hiveserver directly but when I attempt through knox I get:&lt;/P&gt;&lt;PRE&gt;16/10/04 22:31:34 [main]: ERROR jdbc.HiveConnection: Error opening sessionorg.apache.thrift.transport.TTransportException: HTTP Response code: 401&lt;/PRE&gt;&lt;P&gt;In Hive server logs:&lt;/P&gt;&lt;P&gt;2016-10-04 22:31:34,063 INFO  [HiveServer2-HttpHandler-Pool: Thread-299]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doKerberosAuth(398)) - Failed to authenticate with http/_HOST kerberos principal, trying with hive/_HOST kerberos principal&lt;/P&gt;&lt;P&gt;2016-10-04 22:31:34,063 ERROR [HiveServer2-HttpHandler-Pool: Thread-299]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doKerberosAuth(406)) - Failed to authenticate with hive/_HOST kerberos principal&lt;/P&gt;&lt;P&gt;2016-10-04 22:31:34,064 ERROR [HiveServer2-HttpHandler-Pool: Thread-299]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doPost(209)) - Error: &lt;/P&gt;&lt;P&gt;org.apache.hive.service.auth.HttpAuthenticationException: java.lang.reflect.UndeclaredThrowableException&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doKerberosAuth(ThriftHttpServlet.java:407)&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(ThriftHttpServlet.java:159)&lt;/P&gt;&lt;P&gt;at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)&lt;/P&gt;&lt;P&gt;at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.Server.handle(Server.java:349)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:925)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:952)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)&lt;/P&gt;&lt;P&gt;at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)&lt;/P&gt;&lt;P&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;/P&gt;&lt;P&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;/P&gt;&lt;P&gt;at java.lang.Thread.run(Thread.java:745)&lt;/P&gt;&lt;P&gt;Caused by: java.lang.reflect.UndeclaredThrowableException&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1742)&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doKerberosAuth(ThriftHttpServlet.java:404)&lt;/P&gt;&lt;P&gt;... 23 more&lt;/P&gt;&lt;P&gt;Caused by: org.apache.hive.service.auth.HttpAuthenticationException: Authorization header received from the client is empty.&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.getAuthHeader(ThriftHttpServlet.java:548)&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet.access$100(ThriftHttpServlet.java:74)&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction.run(ThriftHttpServlet.java:449)&lt;/P&gt;&lt;P&gt;at org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction.run(ThriftHttpServlet.java:412)&lt;/P&gt;&lt;P&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;at javax.security.auth.Subject.doAs(Subject.java:415)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)&lt;/P&gt;&lt;P&gt;... 24 more&lt;/P&gt;&lt;P&gt;FYI I have:&lt;/P&gt;&lt;P&gt;hadoop.proxyuser.knox.hosts=&amp;lt;knox_gateway&amp;gt;hadoop.proxyuser.knox.groups=*&lt;/P&gt;&lt;P&gt;Thanks for any help! &lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 05:47:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113187#M42735</guid>
      <dc:creator>mliem</dc:creator>
      <dc:date>2016-10-05T05:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113188#M42736</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11088/mliem.html" nodeid="11088"&gt;@mliem&lt;/A&gt; Can you try doing kinit before running curl command?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 12:53:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113188#M42736</guid>
      <dc:creator>nshetty</dc:creator>
      <dc:date>2016-10-13T12:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113189#M42737</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/6858/nshetty.html" nodeid="6858"&gt;@nshetty&lt;/A&gt; We are also fasing the same issue that mliem is facing and doing a kinit dint help&lt;/P&gt;&lt;P&gt;&lt;A href="http://ec2-52-89-10-2.us-west-2.compute.amazonaws.com/users/11088/mliem.html"&gt;@mliem&lt;/A&gt; Are you able to get pass of this error ?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 23:33:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113189#M42737</guid>
      <dc:creator>george_gittu</dc:creator>
      <dc:date>2016-10-31T23:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113190#M42738</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3380/georgegittu.html" nodeid="3380"&gt;@Gerg Git&lt;/A&gt;&lt;P&gt;No I did not, I ended up using a different LDAP server freeipa which has been proven to integrate with kerberos and knox nicely.&lt;/P&gt;&lt;P&gt;I was using openldap, cloudbreak and amazon linux servers on HDP 2.5. I suspect its something related to that or the way I had installed kerberos. &lt;/P&gt;&lt;P&gt;What are you using? &lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 23:40:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113190#M42738</guid>
      <dc:creator>mliem</dc:creator>
      <dc:date>2016-10-31T23:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113191#M42739</link>
      <description>&lt;A href="https://community.hortonworks.com/users/11088/mliem.html"&gt;@mliem&lt;/A&gt;:
 We are using AD. This issue we are facing in our new HDP 2.5 build. We 
have this one working with no issues in our previous cluster which is 
HDP2.3.2 version(using same AD server). I suspect its something to do 
with the configs. I could find the same error reported in hbase (&lt;A href="http://gethue.com/hbase-browsing-with-doas-impersonation-and-kerberos"&gt;http://gethue.com/hbase-browsing-with-doas-impersonation-and-kerberos&lt;/A&gt;/) search for&lt;P&gt;&lt;CODE&gt;Caused by: org.apache.hadoop.hbase.thrift.HttpAuthenticationException: Authorization header received from the client is empty.&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2016 23:56:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113191#M42739</guid>
      <dc:creator>george_gittu</dc:creator>
      <dc:date>2016-10-31T23:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113192#M42740</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/11088/mliem.html"&gt;@mliem&lt;/A&gt;: how did you integrate kerberos and openldap? Could you give me some advice ?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 18:58:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113192#M42740</guid>
      <dc:creator>373789278</dc:creator>
      <dc:date>2016-11-22T18:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113193#M42741</link>
      <description>&lt;P&gt;Hi everyone, I am facing same issue connecting to Hive HTTP through Knox. On Knox gateway logs, I have:&lt;/P&gt;&lt;P&gt;access|uri|/gateway/default/hive/?op=LISTSTATUS|success|Response status: 401&lt;/P&gt;&lt;P&gt;@mliem: have you fixed your problem and if so, can you please tell me how ?&lt;/P&gt;&lt;P&gt;FYI, connecting directly to Hive HTTP with beeline and same crendentials works fine.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 19:45:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/113193#M42741</guid>
      <dc:creator>mister_letaz</dc:creator>
      <dc:date>2018-05-23T19:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/303853#M42742</link>
      <description>&lt;P&gt;I am not using Kerberos. I am using username/password as method for auth. But I am getting the same exact error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Cloudera][ThriftExtension] (8) Authentication/authorization error occurred. Error details: Bad status with no error message: Unauthorized/Forbidden: Status code : 401&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the gateway logs, it shows:&lt;/P&gt;&lt;P&gt;20/10/02 18:04:34 ||2bf99023-8397-4c4c-86b1-43f5a0ab5a39|audit|HIVE||||access|uri|/gateway/default/hive|unavailable|Request method: POST&lt;BR /&gt;20/10/02 18:04:35 ||2bf99023-8397-4c4c-86b1-43f5a0ab5a39|audit|HIVE||||access|uri|/gateway/default/hive|success|Response status: 401&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 23:05:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/303853#M42742</guid>
      <dc:creator>sjogle-c</dc:creator>
      <dc:date>2020-10-02T23:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/385059#M42743</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/51138"&gt;@mliem&lt;/a&gt;&amp;nbsp;: Did you resolve this issue? if so can you please share what was done? I'm facing the same error when connecting to Hive via Knox.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 16:39:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/385059#M42743</guid>
      <dc:creator>Hadoop16</dc:creator>
      <dc:date>2024-03-15T16:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Hive JDBC/webHDFS through Knox in secured cluster (kerberos)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/385062#M42744</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;Welcome to the Cloudera Community! As this is an older post, you would have a better chance of receiving a resolution by&lt;A href="“https://community.cloudera.com/t5/forums/postpage/board-id/Questions”" target="_blank"&gt; starting a new thread&lt;/A&gt;. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 17:31:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-Hive-JDBC-webHDFS-through-Knox-in-secured-cluster/m-p/385062#M42744</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2024-03-15T17:31:31Z</dc:date>
    </item>
  </channel>
</rss>

