<?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 webHDFS works but YARN Rest API doesn't with kerberos enabled in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172426#M42071</link>
    <description>&lt;P&gt;That was it.I still had to apply the following to make it work for YARN as well:&lt;/P&gt;&lt;P&gt;First generate a secret key and push it to all nodes. Instructions &lt;A href="https://github.com/seanorama/masterclass/tree/master/security-advanced#lab-4"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then add to custom core-site.xml:&lt;/P&gt;&lt;PRE&gt;hadoop.http.authentication.simple.anonymous.allowed=false
hadoop.http.authentication.signature.secret.file=/etc/security/http_secret
hadoop.http.authentication.type=kerberos
hadoop.http.authentication.kerberos.keytab=/etc/security/keytabs/spnego.service.keytab
hadoop.http.authentication.kerberos.principal=HTTP/_HOST@LAB.HORTONWORKS.NET
hadoop.http.authentication.cookie.domain=lab.hortonworks.net
hadoop.http.filter.initializers=org.apache.hadoop.security.AuthenticationFilterInitializer
&lt;/PRE&gt;&lt;P&gt;Restart ambari-server&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2016 19:52:03 GMT</pubDate>
    <dc:creator>jknulst</dc:creator>
    <dc:date>2016-09-28T19:52:03Z</dc:date>
    <item>
      <title>Accessing webHDFS works but YARN Rest API doesn't with kerberos enabled</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172424#M42069</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can access webHDFS from cli just fine:&lt;/P&gt;&lt;PRE&gt;[root@sandbox ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: root@SANDBOX.HORTONWORKS.COM


Valid starting     Expires            Service principal
09/28/16 00:25:33  09/28/16 10:25:36  krbtgt/SANDBOX.HORTONWORKS.COM@SANDBOX.HORTONWORKS.COM
	renew until 10/05/16 00:25:33
09/28/16 00:25:40  09/28/16 10:25:36  HTTP/sandbox.hortonworks.com@SANDBOX.HORTONWORKS.COM
	renew until 10/05/16 00:25:33
[root@sandbox ~]# curl -s -i --negotiate -u:anyUser &lt;A href="http://sandbox.hortonworks.com:50070/webhdfs/v1/?op=LISTSTATUS" target="_blank"&gt;http://sandbox.hortonworks.com:50070/webhdfs/v1/?op=LISTSTATUS&lt;/A&gt;
HTTP/1.1 401 Authentication required
Cache-Control: must-revalidate,no-cache,no-store
Date: Tue, 27 Sep 2016 23:07:01 GMT
Pragma: no-cache
Date: Tue, 27 Sep 2016 23:07:01 GMT
Pragma: no-cache
Content-Type: text/html; charset=iso-8859-1
WWW-Authenticate: Negotiate
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Content-Length: 1404
Server: Jetty(6.1.26.hwx)


HTTP/1.1 200 OK
Cache-Control: no-cache
Expires: Tue, 27 Sep 2016 23:07:01 GMT
Date: Tue, 27 Sep 2016 23:07:01 GMT
Pragma: no-cache
Expires: Tue, 27 Sep 2016 23:07:01 GMT
Date: Tue, 27 Sep 2016 23:07:01 GMT
Pragma: no-cache
Content-Type: application/json
Set-Cookie: hadoop.auth="u=root&amp;amp;p=root@SANDBOX.HORTONWORKS.COM&amp;amp;t=kerberos&amp;amp;e=1475053621856&amp;amp;s=OmhtWeWb8vfQ2n1eb9GhlOTq/CA="; Path=/; HttpOnly
Transfer-Encoding: chunked
Server: Jetty(6.1.26.hwx)


{"FileStatuses":{"FileStatus":[
{"accessTime":0,"blockSize":0,"childrenNum":1,"fileId":16396,"group":"hadoop","length":0,"modificationTime":1472134778352,"owner":"yarn","pathSuffix":"app-logs","permission":"777","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":4,"fileId":16392,"group":"hdfs","length":0,"modificationTime":1457965550121,"owner":"hdfs","pathSuffix":"apps","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":2,"fileId":16389,"group":"hadoop","length":0,"modificationTime":1457965143118,"owner":"yarn","pathSuffix":"ats","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":1,"fileId":17246,"group":"hdfs","length":0,"modificationTime":1457967047371,"owner":"hdfs","pathSuffix":"demo","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":1,"fileId":16403,"group":"hdfs","length":0,"modificationTime":1457965151394,"owner":"hdfs","pathSuffix":"hdp","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":1,"fileId":16399,"group":"hdfs","length":0,"modificationTime":1457965149964,"owner":"mapred","pathSuffix":"mapred","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":2,"fileId":16401,"group":"hadoop","length":0,"modificationTime":1457965161645,"owner":"mapred","pathSuffix":"mr-history","permission":"777","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":1,"fileId":17161,"group":"hdfs","length":0,"modificationTime":1457966562806,"owner":"hdfs","pathSuffix":"ranger","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":0,"fileId":16437,"group":"hadoop","length":0,"modificationTime":1474960367134,"owner":"spark","pathSuffix":"spark-history","permission":"777","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":8,"fileId":16386,"group":"hdfs","length":0,"modificationTime":1472158956829,"owner":"hdfs","pathSuffix":"tmp","permission":"777","replication":0,"storagePolicy":0,"type":"DIRECTORY"},
{"accessTime":0,"blockSize":0,"childrenNum":9,"fileId":16387,"group":"hdfs","length":0,"modificationTime":1457966006266,"owner":"hdfs","pathSuffix":"user","permission":"755","replication":0,"storagePolicy":0,"type":"DIRECTORY"}
]}}
&lt;/PRE&gt;&lt;P&gt;But when I try the same for YARN webUI or REST API it fails:&lt;/P&gt;&lt;PRE&gt;[root@sandbox ~]# curl -s -ikv --negotiate -u:anyUser -X GET &lt;A href="http://sandbox.hortonworks.com:8088/ws/v1/cluster/apps" target="_blank"&gt;http://sandbox.hortonworks.com:8088/ws/v1/cluster/apps&lt;/A&gt;
* About to connect() to sandbox.hortonworks.com port 8088 (#0)
*   Trying 10.0.3.15... connected
* Connected to sandbox.hortonworks.com (10.0.3.15) port 8088 (#0)
&amp;gt; GET /ws/v1/cluster/apps HTTP/1.1
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: sandbox.hortonworks.com:8088
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 401 Authentication required
HTTP/1.1 401 Authentication required
&amp;lt; Cache-Control: must-revalidate,no-cache,no-store
Cache-Control: must-revalidate,no-cache,no-store
&amp;lt; Date: Tue, 27 Sep 2016 23:08:45 GMT
Date: Tue, 27 Sep 2016 23:08:45 GMT
&amp;lt; Pragma: no-cache
Pragma: no-cache
&amp;lt; Date: Tue, 27 Sep 2016 23:08:45 GMT
Date: Tue, 27 Sep 2016 23:08:45 GMT
&amp;lt; Pragma: no-cache
Pragma: no-cache
&amp;lt; Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1
&amp;lt; WWW-Authenticate: PseudoAuth
WWW-Authenticate: PseudoAuth
&amp;lt; Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
&amp;lt; Content-Length: 1411
Content-Length: 1411
&amp;lt; Server: Jetty(6.1.26.hwx)
Server: Jetty(6.1.26.hwx)


&amp;lt;
&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 /ws/v1/cluster/apps. 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;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;
&amp;lt;br/&amp;gt;


&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
* Connection #0 to host sandbox.hortonworks.com left intact
* Closing connection #0
&lt;/PRE&gt;&lt;P&gt;What is the difference with these 2 calls ?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 06:12:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172424#M42069</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-09-28T06:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing webHDFS works but YARN Rest API doesn't with kerberos enabled</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172425#M42070</link>
      <description>&lt;P&gt;I'm running on a secured cluster and with the execution of &lt;/P&gt;&lt;PRE&gt;curl --negotiate -u: -X GET &lt;A href="http://&amp;lt;HOSTNAME&amp;gt;/ws/v1/cluster/apps" target="_blank"&gt;http://&amp;lt;HOSTNAME&amp;gt;/ws/v1/cluster/apps&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;I get a normal response back. Have you enabled HTTP authentication for the services as described in &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/_configuring_http_authentication_for_HDFS_YARN_MapReduce2_HBase_Oozie_Falcon_and_Storm.html"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/_configuring_http_authentication_for_HDFS_YARN_MapReduce2_HBase_Oozie_Falcon_and_Storm.html&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 17:43:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172425#M42070</guid>
      <dc:creator>berry_osterlund</dc:creator>
      <dc:date>2016-09-28T17:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing webHDFS works but YARN Rest API doesn't with kerberos enabled</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172426#M42071</link>
      <description>&lt;P&gt;That was it.I still had to apply the following to make it work for YARN as well:&lt;/P&gt;&lt;P&gt;First generate a secret key and push it to all nodes. Instructions &lt;A href="https://github.com/seanorama/masterclass/tree/master/security-advanced#lab-4"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then add to custom core-site.xml:&lt;/P&gt;&lt;PRE&gt;hadoop.http.authentication.simple.anonymous.allowed=false
hadoop.http.authentication.signature.secret.file=/etc/security/http_secret
hadoop.http.authentication.type=kerberos
hadoop.http.authentication.kerberos.keytab=/etc/security/keytabs/spnego.service.keytab
hadoop.http.authentication.kerberos.principal=HTTP/_HOST@LAB.HORTONWORKS.NET
hadoop.http.authentication.cookie.domain=lab.hortonworks.net
hadoop.http.filter.initializers=org.apache.hadoop.security.AuthenticationFilterInitializer
&lt;/PRE&gt;&lt;P&gt;Restart ambari-server&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 19:52:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Accessing-webHDFS-works-but-YARN-Rest-API-doesn-t-with/m-p/172426#M42071</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2016-09-28T19:52:03Z</dc:date>
    </item>
  </channel>
</rss>

