Support Questions
Find answers, ask questions, and share your expertise

Webhdfs kerberos authentication

New Contributor



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 :  ""
* About to connect() to port 50070 (#0)
*   Trying
* Connected to ( port 50070 (#0)
> GET /webhdfs/v1/tmp?op=LISTSTATUS HTTP/1.1
> User-Agent: curl/7.29.0
> Host:
> 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
* 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

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