<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Hive server 2 authentication with AD issues in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213617#M72003</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;When I tried to config hive server 2 authentication with AD. I am getting below error  in beeline&lt;/P&gt;&lt;P&gt;Beeline version 1.2.1000.2.6.0.3-8 by Apache Hive
beeline&amp;gt; !connect jdbc:hive2://local host:10000
Connecting to jdbc:hive2://local host:10000
Enter username for jdbc:hive2://localhost:10000: XXXX&lt;/P&gt;&lt;P&gt; Enter password for  jdbc:hive2://feabigrpd01:10000: ********** &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Connected to: Apache Hive (version 1.2.1000.2.6.0.3-8)
Driver: Hive JDBC (version 1.2.1000.2.6.0.3-8)
Transaction isolation:&lt;/STRONG&gt; TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://local host:10000&amp;gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://localhost:10000&amp;gt; show databases ;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user XXXX does not have [USE] privilege on [null] (state=42000,code=40000)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. I have configured below properties &lt;/P&gt;&lt;P&gt;hive.server2.authentication =LDAP&lt;/P&gt;&lt;P&gt;hive.server2.authentication.ldap.url=ldap://XXX.co.XX:389&lt;/P&gt;&lt;P&gt;hive.server2.authentication.ldap.Domain=dc=XXX,dc=co,dc=XX&lt;/P&gt;&lt;P&gt;2. hive server2 logs error :/var/log/hive&lt;/P&gt;&lt;P&gt;ERROR [HiveServer2-Handler-Pool: Thread-71]: transport.TSaslTransport (TSaslTransport.java:open(315)) - SASL negotiation failure
javax.security.sasl.SaslException: Error validating the login [Caused by javax.security.sasl.AuthenticationException: LDAP Authentication failed for user [Caused by javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580^@]]]
        at org.apache.hive.service.auth.PlainSaslServer.evaluateResponse(PlainSaslServer.java:109)&lt;/P&gt;&lt;P&gt;Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580^@]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3135)&lt;/P&gt;&lt;P&gt;3. Ambari Hive view authentication error :&lt;/P&gt;&lt;H3&gt;Service checks completed&lt;/H3&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;HDFS test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;HiveServer test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ATS test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;User Home Directory test&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;H3&gt;Issues detected&lt;/H3&gt;&lt;P&gt;Hive authentication failed&lt;/P&gt;&lt;P&gt;4. I have got ranger policy in place which gives the permission to user XXX to all the directories in HDFS  &amp;amp; select access to all tables.&lt;/P&gt;&lt;P&gt;Please assist me to resolve this issue. Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2017 04:33:04 GMT</pubDate>
    <dc:creator>samant_thakur</dc:creator>
    <dc:date>2017-11-30T04:33:04Z</dc:date>
    <item>
      <title>Hive server 2 authentication with AD issues</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213617#M72003</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;When I tried to config hive server 2 authentication with AD. I am getting below error  in beeline&lt;/P&gt;&lt;P&gt;Beeline version 1.2.1000.2.6.0.3-8 by Apache Hive
beeline&amp;gt; !connect jdbc:hive2://local host:10000
Connecting to jdbc:hive2://local host:10000
Enter username for jdbc:hive2://localhost:10000: XXXX&lt;/P&gt;&lt;P&gt; Enter password for  jdbc:hive2://feabigrpd01:10000: ********** &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Connected to: Apache Hive (version 1.2.1000.2.6.0.3-8)
Driver: Hive JDBC (version 1.2.1000.2.6.0.3-8)
Transaction isolation:&lt;/STRONG&gt; TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://local host:10000&amp;gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://localhost:10000&amp;gt; show databases ;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user XXXX does not have [USE] privilege on [null] (state=42000,code=40000)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. I have configured below properties &lt;/P&gt;&lt;P&gt;hive.server2.authentication =LDAP&lt;/P&gt;&lt;P&gt;hive.server2.authentication.ldap.url=ldap://XXX.co.XX:389&lt;/P&gt;&lt;P&gt;hive.server2.authentication.ldap.Domain=dc=XXX,dc=co,dc=XX&lt;/P&gt;&lt;P&gt;2. hive server2 logs error :/var/log/hive&lt;/P&gt;&lt;P&gt;ERROR [HiveServer2-Handler-Pool: Thread-71]: transport.TSaslTransport (TSaslTransport.java:open(315)) - SASL negotiation failure
javax.security.sasl.SaslException: Error validating the login [Caused by javax.security.sasl.AuthenticationException: LDAP Authentication failed for user [Caused by javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580^@]]]
        at org.apache.hive.service.auth.PlainSaslServer.evaluateResponse(PlainSaslServer.java:109)&lt;/P&gt;&lt;P&gt;Caused by: javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09042F, comment: AcceptSecurityContext error, data 52e, v2580^@]
        at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3135)&lt;/P&gt;&lt;P&gt;3. Ambari Hive view authentication error :&lt;/P&gt;&lt;H3&gt;Service checks completed&lt;/H3&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;HDFS test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;HiveServer test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ATS test&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;User Home Directory test&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;H3&gt;Issues detected&lt;/H3&gt;&lt;P&gt;Hive authentication failed&lt;/P&gt;&lt;P&gt;4. I have got ranger policy in place which gives the permission to user XXX to all the directories in HDFS  &amp;amp; select access to all tables.&lt;/P&gt;&lt;P&gt;Please assist me to resolve this issue. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 04:33:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213617#M72003</guid>
      <dc:creator>samant_thakur</dc:creator>
      <dc:date>2017-11-30T04:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hive server 2 authentication with AD issues</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213618#M72004</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/12679/samantthakur.html" nodeid="12679"&gt;@Samant Thakur&lt;/A&gt;&lt;P&gt;Please check Ranger Audit first to find out whether it was blocked by Ranger or not. If it is being blocked then it must be the Hive policy, which is blocking you. Please let me know.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 06:21:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213618#M72004</guid>
      <dc:creator>manish1</dc:creator>
      <dc:date>2017-11-30T06:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hive server 2 authentication with AD issues</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213619#M72005</link>
      <description>&lt;P&gt;@Manish Gupta Thank you so much for your response. I managed to resolve this issue by entering the username in upper case and was able to access all the Hive tables based on the policies defined in Ranger. It's strange that when I type username in lowercase ,AD authentication was  successful but permissions denied to access the tables. I have attached screenshots of both scenarios.&lt;/P&gt;&lt;P&gt;Thanks.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/42872-hive-ad-issue.png"&gt;hive-ad-issue.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 22:21:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213619#M72005</guid>
      <dc:creator>samant_thakur</dc:creator>
      <dc:date>2017-12-02T22:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hive server 2 authentication with AD issues</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213620#M72006</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12679/samantthakur.html" nodeid="12679"&gt;@Samant Thakur&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, it is very annoying when User ID is in upper or mixed case, which is very normal in AD, which is not case-sensitive. But, linux is case-sensitive and so is Ranger. You can remove case-sensitivity in Ranger. But, it is ideal to do it during the installation. You can refer to this article: &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/content/kbentry/145832/ranger-user-sync-issues-due-to-case-difference.html" target="_blank"&gt;https://community.hortonworks.com/content/kbentry/145832/ranger-user-sync-issues-due-to-case-difference.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;PS: As usual, If you think my response helped you to find a solution then please accept my response as the best answer.&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12679/samantthakur.html" nodeid="12679"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2017 02:36:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-server-2-authentication-with-AD-issues/m-p/213620#M72006</guid>
      <dc:creator>manish1</dc:creator>
      <dc:date>2017-12-03T02:36:53Z</dc:date>
    </item>
  </channel>
</rss>

