In a secured Hadoop cluster, you can come across situations in which Hadoop daemons (namenode, datanode etc.) fails to start due to Kerberos authentication issues. The error message "Unable to obtain password from user" is produced.
Daemons logs will help you identify investigate the problem further.
The output from the namenode logs are displayed below:
2014-03-27 17:57:57,904 FATAL org.apache.hadoop.hdfs.server.namenode.NameNode: Exception in namenode join java.io.IOException: Login failure for hdfs/dev6ha@SATURN.LOCAL from keytab /etc/security/phd/keytab/hdfs.service.keytab at org.apache.hadoop.security.UserGroupInformation.loginUserFromKeytab(UserGroupInformation.java:836) .. Caused by: javax.security.auth.login.LoginException: Unable to obtain password from user at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:789) .. 2014-03-27 18:15:33,186 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1 2014-03-27 18:15:33,188 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at hdm1.saturn.local/10.246.67.243
The instructions below will help you start the investigation. We have used the above log snippet values for this example.
: hdfs/dev6ha@SATURN.LOCAL
Note: In this example, DNS returned the IP as 10.246.67.243, but /etc/hosts is pointing to 10.246.67.218. _HOST is getting replaced by the nameservice name (dev6ha) instead of the actual hostname because this was a NameNode High Availability configuration.
/etc/security/
/etc/security/
/etc/security/phd/keytab/hdfs.service.keytab
If the keytab file defined in hdfs-site.xml is not present, an error will be produced. Verify the path and the keytab filename.
[root@phd11-nn keytab] kinit -ket /etc/security/phd/keytab/hdfs.service.keytab hdfs/[email protected]
Execute the following command to verify contents of the keytab file:
klist -ket /etc/security/phd/keytab/hdfs.server.keytab
[root@KDC server] kadmin.local ktadd -norandkey -k /etc/security/keytab/hdfs-hostid.service.keytab hdfs/host_fqdn@REALM HTTP/host_fqdn@REALM