AnsweredAssumed Answered

kerberos Hive Server issue

Question asked by sathish on Sep 5, 2013
Latest reply on Sep 6, 2013 by yufeldman
I am setting Kerberos authentication on Hive Server2. Using hive 0.11 from mapr distribution.
After setting the following configurations, when trying to start hive server2, it failing with the following error
13/09/05 08:59:10 INFO service.AbstractService: Service:HiveServer2 is started.
javax.security.auth.login.LoginException: Kerberos principal should have 3 parts: root
at org.apache.hive.service.auth.HiveAuthFactory.getAuthTransFactory(HiveAuthFactory.java:82)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.run(ThriftCLIService.java:403)
        at java.lang.Thread.run(Thread.java:722)


I have generated the principal and keytab files and giving the same principal name, although it has proper 3 parts still it’s giving this error.
Can anybody know how to resolve this issue or any suggestions.

Hive Server hive-site.xml file

------------------------------------------------------------
<configuration>
<property>
   <name>hive.server2.authentication</name>
    <value>KERBEROS</value>
    <description>Authentication type </description>
</property>

<property>
   <name>hive.server2.authentication.kerberos.principal</name>
    <value>root/_HOST@EXAMPLE.COM</value>
    <description>The service principal for the HiveServer2. If _HOST is
           used as the hostname portion, it will be replaced with the actual
           hostname of the running instance.</description>
</property>

<property>
    <name>hive.server2.authentication.kerberos.keytab</name>
    <value>/opt/mapr/hive/hive-0.11/conf/hive.keytab</value>
    <description>The keytab for the HiveServer2 service principal</description>
</property>
</configuration>

Outcomes