javax.servlet.ServletException: javax.security.auth.login.LoginException: Unable to obtain password from user

hadoop-user | Daryn Sharp | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: kerberos principal don't replace _HTTP to their own host name

    hadoop-user | 4 years ago | Daryn Sharp
    javax.servlet.ServletException: javax.security.auth.login.LoginException: Unable to obtain password from user
  2. 0

    [HDFS-3813] Log error message if security and WebHDFS are enabled but principal/keytab are not configured - ASF JIRA

    apache.org | 1 year ago
    javax.servlet.ServletException: javax.servlet.ServletException: Principal not defined in configuration
  3. 0

    I configured a secure HDFS cluster, but failed to start the NameNode because I had enabled WebHDFS without specifying _dfs.web.authentication.kerberos.principal_ in hdfs-site.xml. In the NN logs, I saw: {noformat} 2012-05-28 17:50:13,021 INFO org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler: Login using keytab /etc/hdfs.keytab, for principal HTTP/c1225.hal.cloudera.com@HAL.CLOUDERA.COM 2012-05-28 17:50:13,030 INFO org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler: Initialized, principal [HTTP/c1225.hal.cloudera.com@HAL.CLOUDERA.COM] from keytab [/etc/hdfs.keytab] 2012-05-28 17:50:13,031 WARN org.apache.hadoop.security.authentication.server.AuthenticationFilter: 'signature.secret' configuration not set, using a random value as secret 2012-05-28 17:50:13,032 WARN org.mortbay.log: failed SPNEGO: javax.servlet.ServletException: javax.servlet.ServletException: Principal not defined in configuration 2012-05-28 17:50:13,033 WARN org.mortbay.log: Failed startup of context org.mortbay.jetty.webapp.WebAppContext@21453d72{/,file:/usr/lib/hadoop-hdfs/webapps/hdfs} javax.servlet.ServletException: javax.servlet.ServletException: Principal not defined in configuration at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:185) at org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:146) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.apache.hadoop.http.HttpServer.start(HttpServer.java:617) at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:173) at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:529) at org.apache.hadoop.hdfs.server.namenode.NameNode.startCommonServices(NameNode.java:471) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:434) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:590) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:571) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1134) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1193) Caused by: javax.servlet.ServletException: Principal not defined in configuration at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:146) ... 24 more 2012-05-28 17:50:13,034 WARN org.mortbay.log: Nested in javax.servlet.ServletException: javax.servlet.ServletException: Principal not defined in configuration: javax.servlet.ServletException: Principal not defined in configuration at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:146) at org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:146) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.apache.hadoop.http.HttpServer.start(HttpServer.java:617) at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:173) at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:529) at org.apache.hadoop.hdfs.server.namenode.NameNode.startCommonServices(NameNode.java:471) at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:434) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:590) at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:571) at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1134) at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1193) 2012-05-28 17:50:13,041 INFO org.mortbay.log: Started SelectChannelConnector@c1225.hal.cloudera.com:50070 2012-05-28 17:50:13,041 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: Web-server up at: c1225.hal.cloudera.com:50070 2012-05-28 17:50:13,042 INFO org.apache.hadoop.ipc.Server: IPC Server Responder: starting 2012-05-28 17:50:13,042 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 17020: starting 2012-05-28 17:50:13,045 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: NameNode up at: c1225.hal.cloudera.com/172.29.98.216:17020 2012-05-28 17:50:13,045 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Starting services required for standby state 2012-05-28 17:50:13,048 INFO org.apache.hadoop.hdfs.server.namenode.ha.EditLogTailer: Will roll logs on active node at c1226.hal.cloudera.com/172.29.98.217:17020 every 120 seconds. 2012-05-28 17:50:13,058 INFO org.apache.hadoop.hdfs.server.namenode.ha.StandbyCheckpointer: Starting standby checkpoint thread... Checkpointing active NN at c1226.hal.cloudera.com:50070 Serving checkpoints at c1225.hal.cloudera.com/172.29.98.216:50070 {noformat} I couldn't figure out what I had misconfigured, but ATM found that I was missing _dfs.web.authentication.kerberos.principal_. Logging an error if this property is not configured when WebHDFS and security are enabled would be useful for future users running into the same problem.

    Apache's JIRA Issue Tracker | 5 years ago | Stephen Chu
    javax.servlet.ServletException: Principal not defined in configuration
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [HADOOP-11754] RM fails to start in non-secure mode due to authentication filter failure - ASF JIRA

    apache.org | 2 years ago
    javax.servlet.ServletException: java.lang.RuntimeException: Could not read signature secret file: /Users/sjlee/hadoop-http-auth-signature-secret
  6. 0

    [HADOOP-11754] RM fails to start in non-secure mode due to authentication filter failure - ASF JIRA

    apache.org | 1 year ago
    javax.servlet.ServletException: java.lang.RuntimeException: Could not read signature secret file: /Users/sjlee/hadoop-http-auth-signature-secret

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.servlet.ServletException

      javax.security.auth.login.LoginException: Unable to obtain password from user

      at org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init()
    2. Apache Hadoop Auth
      AuthenticationFilter.init
      1. org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler.init(KerberosAuthenticationHandler.java:178)
      2. org.apache.hadoop.security.authentication.server.AuthenticationFilter.init(AuthenticationFilter.java:146)
      2 frames
    3. Jetty Server
      FilterHolder.doStart
      1. org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
      1 frame
    4. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    5. Jetty Server
      WebAppContext.doStart
      1. org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
      2. org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
      3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
      4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
      5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
      5 frames
    6. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    7. Jetty Server
      ContextHandlerCollection.doStart
      1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      2. org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
      2 frames
    8. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    9. Jetty Server
      Server.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      2. org.mortbay.jetty.Server.doStart(Server.java:224)
      2 frames
    10. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    11. Hadoop
      HttpServer.start
      1. org.apache.hadoop.http.HttpServer.start(HttpServer.java:631)
      1 frame
    12. Apache Hadoop HDFS
      NameNode$1.run
      1. org.apache.hadoop.hdfs.server.namenode.NameNode$1.run(NameNode.java:484)
      2. org.apache.hadoop.hdfs.server.namenode.NameNode$1.run(NameNode.java:362)
      2 frames
    13. Java RT
      Subject.doAs
      1. java.security.AccessController.doPrivileged(Native Method)
      2. javax.security.auth.Subject.doAs(Subject.java:396)
      2 frames
    14. Hadoop
      UserGroupInformation.doAs
      1. org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1149)
      1 frame
    15. Apache Hadoop HDFS
      NameNode.main
      1. org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:362)
      2. org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:313)
      3. org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:536)
      4. org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1410)
      5. org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1419)
      5 frames