<?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: Secured WebHDFS HA with HAProxy in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171509#M133806</link>
    <description>&lt;P&gt;Can you please share your hdfs-site.xml file.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 07:25:45 GMT</pubDate>
    <dc:creator>namaheshwari</dc:creator>
    <dc:date>2017-03-23T07:25:45Z</dc:date>
    <item>
      <title>Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171506#M133803</link>
      <description>&lt;P&gt;
Has anyone made HAProxy work with Kerberos-ed WebHDFS for HA?&lt;/P&gt;&lt;P&gt;
I've been trying to but couldn't make it work.
Now I'm testing with the simplest haproxy.cfg like below&lt;/P&gt;&lt;PRE&gt;...
frontend main *:50070
    default_backend app
backend app
    server node2 node2.localdomain:50070 check
&lt;/PRE&gt;&lt;P&gt;Also spnego.servie.keytab on NamaNode is:&lt;/P&gt;&lt;PRE&gt;[root@node2 keytabs]# klist -k spnego.service.keytab
Keytab name: FILE:spnego.service.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   1 HTTP/node1.localdomain@HO-UBU02
   1 HTTP/node1.localdomain@HO-UBU02
   1 HTTP/node1.localdomain@HO-UBU02
   1 HTTP/node1.localdomain@HO-UBU02
   1 HTTP/node2.localdomain@HO-UBU02
   1 HTTP/node2.localdomain@HO-UBU02
   1 HTTP/node2.localdomain@HO-UBU02
   1 HTTP/node2.localdomain@HO-UBU02
&lt;/PRE&gt;&lt;P&gt;
And getting "HTTP/1.1 403 GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)"&lt;/P&gt;&lt;P&gt;
Or which tool/software would you use for WebHDFS with Kerberos for HA if no Knox and no hadoop-httpfs?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 05:30:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171506#M133803</guid>
      <dc:creator>hosako</dc:creator>
      <dc:date>2017-03-23T05:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171507#M133804</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/206/hosako.html" nodeid="206"&gt;@Hajime&lt;/A&gt; - Please see below Apache Documentation for WebHdfs Authentication:&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Authentication" target="_blank"&gt;https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Authentication&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As stated in point 2 for Kerberos enabled cluster you can do kinit with Spengo Principal and perform the webhdfs operation.&lt;/P&gt;&lt;P&gt;Can you please paste the command you are trying and the stack trace to debug further?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 06:36:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171507#M133804</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-23T06:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171508#M133805</link>
      <description>&lt;PRE&gt;[root@node1 ~]# curl -i --negotiate -u : 'http://node1.localdomain:50070/webhdfs/v1/tmp/?op=LISTSTATUS'
HTTP/1.1 401 Authentication required
Cache-Control: must-revalidate,no-cache,no-store
Date: Thu, 23 Mar 2017 00:05:33 GMT
Pragma: no-cache
Date: Thu, 23 Mar 2017 00:05:33 GMT
Pragma: no-cache
Content-Type: text/html; charset=iso-8859-1
WWW-Authenticate: Negotiate
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Content-Length: 1408
Server: Jetty(6.1.26.hwx)


HTTP/1.1 403 GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)
Cache-Control: must-revalidate,no-cache,no-store
Date: Thu, 23 Mar 2017 00:05:33 GMT
Pragma: no-cache
Date: Thu, 23 Mar 2017 00:05:33 GMT
Pragma: no-cache
Content-Type: text/html; charset=iso-8859-1
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Content-Length: 1532
Server: Jetty(6.1.26.hwx)


&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 403 GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;&amp;lt;h2&amp;gt;HTTP ERROR 403&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;Problem accessing /webhdfs/v1/tmp/. Reason:
&amp;lt;pre&amp;gt;    GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)&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;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
...

&lt;/PRE&gt;&lt;P&gt;I'm getting this.&lt;/P&gt;&lt;P&gt;Also if I use a delegation token, it works, but normal user wouldn't not know how to get own delegation token... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 07:08:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171508#M133805</guid>
      <dc:creator>hosako</dc:creator>
      <dc:date>2017-03-23T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171509#M133806</link>
      <description>&lt;P&gt;Can you please share your hdfs-site.xml file.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 07:25:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171509#M133806</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-23T07:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171510#M133807</link>
      <description>&lt;P&gt;Sure! Thank you for taking a look at this issue.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/13959-hdfs-site.xml"&gt;hdfs-site.xml&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 07:29:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171510#M133807</guid>
      <dc:creator>hosako</dc:creator>
      <dc:date>2017-03-23T07:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171511#M133808</link>
      <description>&lt;P&gt;Can you please paste the output of running below commands :&lt;/P&gt;&lt;PRE&gt;kinit -kt /etc/security/keytabs/spnego.service.keytab HTTP/node2.localdomain@HO-UBU02
klist
curl -i --negotiate -u : 'http://node2.localdomain:50070/webhdfs/v1/tmp/?op=LISTSTATUS'

&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2017 07:45:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171511#M133808</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-23T07:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171512#M133809</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/102/nmaheshwari.html" nodeid="102"&gt;@Namit Maheshwari&lt;/A&gt; Node2 is Active NameNode right now (node1 is HAProxy server)&lt;/P&gt;&lt;P&gt;I changed to curl -I, if you prefer curl -i, let me know. Thank you!&lt;/P&gt;&lt;PRE&gt;[root@node2 ~]# kdestroy
kdestroy: No credentials cache found while destroying cache
[root@node2 ~]# kinit -kt /etc/security/keytabs/spnego.service.keytab HTTP/node2.localdomain@HO-UBU02
[root@node2 ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: HTTP/node2.localdomain@HO-UBU02

Valid starting     Expires            Service principal
03/23/17 00:54:33  03/23/17 10:54:33  krbtgt/HO-UBU02@HO-UBU02
        renew until 03/30/17 00:54:33
[root@node2 ~]# curl -I --negotiate -u : 'http://node2.localdomain:50070/webhdfs/v1/tmp/?op=LISTSTATUS'
HTTP/1.1 401 Authentication required
Cache-Control: must-revalidate,no-cache,no-store
Date: Thu, 23 Mar 2017 00:55:47 GMT
Pragma: no-cache
Date: Thu, 23 Mar 2017 00:55:47 GMT
Pragma: no-cache
Content-Type: text/html; charset=iso-8859-1
WWW-Authenticate: Negotiate
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Content-Length: 1408
Server: Jetty(6.1.26.hwx)


HTTP/1.1 200 OK
Cache-Control: no-cache
Expires: Thu, 23 Mar 2017 00:55:47 GMT
Date: Thu, 23 Mar 2017 00:55:47 GMT
Pragma: no-cache
Expires: Thu, 23 Mar 2017 00:55:47 GMT
Date: Thu, 23 Mar 2017 00:55:47 GMT
Pragma: no-cache
Content-Type: application/json
Set-Cookie: hadoop.auth="u=HTTP&amp;amp;p=HTTP/node2.localdomain@HO-UBU02&amp;amp;t=kerberos&amp;amp;e=1490266548000&amp;amp;s=HN3jepaKuYI5iKYfJ5IW1wHxJ3M="; Path=/; HttpOnly
Content-Length: 0
Server: Jetty(6.1.26.hwx)


[root@node2 ~]#

&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2017 08:00:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171512#M133809</guid>
      <dc:creator>hosako</dc:creator>
      <dc:date>2017-03-23T08:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171513#M133810</link>
      <description>&lt;P&gt;So, this works fine as expected when we provide the Active Namenode in the curl call instead of the Proxy server.&lt;/P&gt;&lt;P&gt;Yeah, I don't think we can work around this by using a proxy. There is an Apache Jira already open for the issue:&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/HDFS-6371" target="_blank"&gt;https://issues.apache.org/jira/browse/HDFS-6371&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For now I think you can either use the way we did above, or have Knox / Httpfs&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 08:13:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171513#M133810</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-03-23T08:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171514#M133811</link>
      <description>&lt;P&gt;Hello &lt;A rel="user" href="https://community.cloudera.com/users/206/hosako.html" nodeid="206"&gt;@Hajime&lt;/A&gt; San,&lt;/P&gt;&lt;P&gt;Since you have enabled Kerberos &amp;amp; SPNego for both NameNode and then when you make a request to HAProxy URL, curl generates a Kerberos authenticator. This contains principal name (your user), Kerberos service principal name (HTTP/&amp;lt;ha-proxy-node&amp;gt; OR HTTP/node1.localdomain) among other session details. When this authenticator reaches the NameNode (node2.localdomain), it checks that the received authenticator is intended for a service running with 'HTTP/node1.localdomain' service principal. Since the name of NameNode service principal name (HTTP/node1.loc doesn't match with HTTP/node2.localdomain, the error like 'checksum failed' is returned.&lt;/P&gt;&lt;P&gt;To fix this name mismatching, you need to specify "dfs.web.authentication.kerberos.principal=*" in HDFS configuration in Ambari, so that NameNode can allow other principal name as well.&lt;/P&gt;&lt;P&gt;Hope this helps !&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:25:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171514#M133811</guid>
      <dc:creator>VR46</dc:creator>
      <dc:date>2017-03-23T14:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Secured WebHDFS HA with HAProxy</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171515#M133812</link>
      <description>&lt;P&gt;Thanks to &lt;A rel="user" href="https://community.cloudera.com/users/740/vrathor.html" nodeid="740"&gt;@Vipin Rathor&lt;/A&gt;, I was able to setup HAProxy for Kerberos-ed WebHDFS.&lt;/P&gt;&lt;P&gt;After that needed some changes for Ambari, so wrote: &lt;A target="_blank" href="https://community.hortonworks.com/articles/91685/how-to-setup-haproxy-for-webhdfs-ha.html"&gt;https://community.hortonworks.com/articles/91685/how-to-setup-haproxy-for-webhdfs-ha.html&lt;/A&gt; (&lt;A target="_blank" href="https://hadoop-and-hdp.blogspot.com.au/2017/03/kerberoswebhdfshaproxyha.html"&gt;日本語&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2017 08:15:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Secured-WebHDFS-HA-with-HAProxy/m-p/171515#M133812</guid>
      <dc:creator>hosako</dc:creator>
      <dc:date>2017-04-01T08:15:35Z</dc:date>
    </item>
  </channel>
</rss>

