HADOOP-11113. Namenode not able to reconnect to KMS after KMS restart. (Arun Suresh via wang)

(cherry picked from commit e25a25c5343c889d8c9e45b65082ddb55cf36d52)