spark.history.kerberos.principal doesn't understand value _HOST.
It says failure to login for principal : spark/_HOST@realm .
It will be helpful to take _HOST value via config file and change it with current hostname(similar to what Hive does) . This will also help to run SHS on multiple machines without hardcoding principal hostname. .spark.history.kerberos.principal
It require minor change in HistoryServer.scala in initSecurity method .
Please let me know , if this request make sense , I'll create the PR .