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: HTTP error 500

Highlighted

WebHDFS: HTTP error 500

Contributor

I configured HTTP authentication for HDFS (following this document) and I use it as

kinit -V -kt spnego.service.keytab HTTP/example.com@EXAMPLE.COM
curl -s --negotiate -u : "http://example.com:50070/webhdfs/v1/user/test?op=LISTSTATUS"

And I get this message error

HTTP ERROR 500

Problem accessing /webhdfs/v1/. Reason:
    INTERNAL_SERVER_ERROR

Caused by:
java.lang.NullPointerException
	at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler$2.run(KerberosAuthenticationHandler.java:377)
	at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler$2.run(KerberosAuthenticationHandler.java:349)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.authenticate(KerberosAuthenticationHandler.java:349)
	at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:538)
	at org.apache.hadoop.hdfs.web.AuthFilter.doFilter(AuthFilter.java:88)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.apache.hadoop.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1243)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.apache.hadoop.http.NoCacheFilter.doFilter(NoCacheFilter.java:45)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Thanks in advance.

4 REPLIES 4
Highlighted

Re: WebHDFS: HTTP error 500

Super Guru
@Facundo Bianco

Initial reaction is something may be up with your keytab. Can you try to use same keytab principle on hdfs and do a simply hdfs fs -ls?

Highlighted

Re: WebHDFS: HTTP error 500

Contributor

Following your recommendation I list the principals for user `hdfs` and I found two principal in the same cache

Ticket cache: FILE:/tmp/krb5cc_1012
Default principal: hdfs-clustername@EXAMPLE.COM

Valid starting       Expires              Service principal
07/28/2016 HH:MM:SS  MM/DD/YYYY HH:MM:SS  krbtgt/EXAMPLE.COM@EXAMPLE.COM
        Etype (skey, tkt): foo bar 
07/28/2016 HH:MM:SS  MM/DD/YYYY HH:MM:SS  HTTP/example.com@EXAMPLE.COM
        Etype (skey, tkt): foo bar

With this user I can query correctly the webHDFS.

Do you know how to add two principals in the same cache?

Highlighted

Re: WebHDFS: HTTP error 500

Super Guru

@Jean-Philippe Player Your thoughts?

Re: WebHDFS: HTTP error 500

Expert Contributor

Hello @Facundo Bianco were you able to solve this? I'm having the same issue

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