我已经在 Windows 中使用 SASL 为 hadoop-2.6.0 配置了 kerberos 安全性。
一切正常。但是 webhdfs 不能通过 https 协议(protocol)工作。
Permission denied when trying to open /webhdfs/v1/?op=LISTSTATUS: GSSException: Defective token detected (Mechanism level: GSSHeader did not find the right tag)
我刚刚使用 https://hostname:50470/webhdfs/v1/?op=LISTSTATUS 进行了测试
我已经设置了以下属性。但是仍然有同样的错误。
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.web.authentication.kerberos.principal</name>
<value>http/hostname@domain</value>
</property>
<property>
<name>dfs.web.authentication.kerberos.keytab</name>
<value>C:\http.keytab</value>
</property>
帮助将不胜感激。
谢谢。
最佳答案
我认为您是在网络浏览器中输入上述网址 (https://hostname:50470/webhdfs/v1/?op=LISTSTATUS
)。如果是这样,您需要将浏览器配置为访问受 Kerberos 保护的 URL。
更多详细说明位于 http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cdh_sg_browser_access_kerberos_protected_url.html适用于 Firefox/Chrome/IE。
运行浏览器的用户必须成功 kinit 到集群的 Kerberos 服务器。
关于windows - Hadoop webhdfs 需要身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27598040/