Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

[SOLVED] java.io.IOException: Login failure for Datanode

avatar
New Member

I can't start one of my DN (rest of them are running)

2016-09-01 16:35:37,489 ERROR datanode.DataNode (DataNode.java:secureMain(2545)) - Exception in secureMain
java.io.IOException: Login failure for dn/[email protected] from keytab /etc/security/keytabs/dn.service.keytab: javax.security.auth.login.LoginException: Unable to obtain password from user

- File permissions

-r--------. 1 hdfs hadoop 408 Sep  1 15:36 /etc/security/keytabs/dn.service.keytab

- File content

Keytab name: FILE:/etc/security/keytabs/dn.service.keytab
KVNO Timestamp           Principal
---- ------------------- ------------------------------------------------------
   1 09/01/2016 15:36:21 dn/[email protected]
   1 09/01/2016 15:36:21 dn/[email protected]
   1 09/01/2016 15:36:21 dn/[email protected]
   1 09/01/2016 15:36:21 dn/[email protected]
   1 09/01/2016 15:36:21 dn/[email protected]

Also, I found that KDC has the principal `dn/[email protected]` and not `dn/[email protected]`. And this command works:

kinit -kt /etc/security/keytabs/dn.service.keytab dn/[email protected]

So, why is HDFS using a wrong principal?

Should I regenerate the Kerberos keys from Ambari UI? Thanks in advance.

1 ACCEPTED SOLUTION

avatar
New Member

I solved the issue: in the file `/etc/hosts` the short hostname is before the long

192.168.1.3 datanode datanode.example.com

I switched the order

192.168.1.3 datanode.example.com datanode

View solution in original post

1 REPLY 1

avatar
New Member

I solved the issue: in the file `/etc/hosts` the short hostname is before the long

192.168.1.3 datanode datanode.example.com

I switched the order

192.168.1.3 datanode.example.com datanode