Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Webhdfs kerberos authentication

Webhdfs kerberos authentication

New Contributor

Hello,

 

I am having HDP 3.0.1 Sandbox. Enabled the Kerberos on it. When I am trying to use webhdfs with Kerberos on it. I am getting a 401 error outside of the box. When I try the same inside box it is working fine. I have configure hadoop.http.authentication.kerberos.principal properly , Not sure what plays . Can some one throw some lights on it.

 

[root@sandbox-host log]# curl -i -v --negotiate -u :  "http://sandbox-hdp.hortonworks.com:50070/webhdfs/v1/tmp?op=LISTSTATUS"
* About to connect() to sandbox-hdp.hortonworks.com port 50070 (#0)
*   Trying 192.168.56.104...
* Connected to sandbox-hdp.hortonworks.com (192.168.56.104) port 50070 (#0)
> GET /webhdfs/v1/tmp?op=LISTSTATUS HTTP/1.1
> User-Agent: curl/7.29.0
> Host: sandbox-hdp.hortonworks.com:50070
> Accept: */*
> 
< HTTP/1.1 401 Authentication required
HTTP/1.1 401 Authentication required
< Server: nginx/1.15.7
Server: nginx/1.15.7
< Date: Tue, 25 Feb 2020 01:13:43 GMT
Date: Tue, 25 Feb 2020 01:13:43 GMT
< Content-Type: text/html;charset=iso-8859-1
Content-Type: text/html;charset=iso-8859-1
< Content-Length: 274
Content-Length: 274
< Connection: keep-alive
Connection: keep-alive
< Pragma: no-cache
Pragma: no-cache
< X-FRAME-OPTIONS: SAMEORIGIN
X-FRAME-OPTIONS: SAMEORIGIN
* gss_init_sec_context() failed: : Server HTTP/@xxx.COM not found in Kerberos database
< WWW-Authenticate: Negotiate
WWW-Authenticate: Negotiate
< Set-Cookie: hadoop.auth=; Path=/; HttpOnly
Set-Cookie: hadoop.auth=; Path=/; HttpOnly
< Cache-Control: must-revalidate,no-cache,no-store
Cache-Control: must-revalidate,no-cache,no-store

< 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 401 Authentication required</title>
</head>
<body><h2>HTTP ERROR 401</h2>
<p>Problem accessing /webhdfs/v1/tmp. Reason:
<pre>    Authentication required</pre></p>
</body>
</html>
* Connection #0 to host sandbox-hdp.hortonworks.com left intact
core-site.xml-    <property>
core-site.xml:      <name>hadoop.http.authentication.kerberos.principal</name>
core-site.xml-      <value>HTTP/sandbox-hdp.hortonworks.com@xxx.COM</value>
core-site.xml-    </property>

 

Don't have an account?
Coming from Hortonworks? Activate your account here