<?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 Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as &amp;quot;Illegal principal name&amp;quot; and &amp;quot;No rules applied to&amp;quot; in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227930#M189790</link>
    <description>&lt;P&gt;Because of this below property in core-site.xml, it works for you&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;hadoop.security.auth_to_local&lt;/TD&gt;&lt;TD&gt;The mapping rules. For example:&lt;P&gt;&lt;CODE&gt;RULE:[2:$1@$0]([jt]t@.*EXAMPLE.COM)s/.*/mapred/ RULE:[2:$1@$0]([nd]n@.*EXAMPLE.COM)s/.*/hdfs/ RULE:[2:$1@$0](hm@.*EXAMPLE.COM)s/.*/hbase/ RULE:[2:$1@$0](rs@.*EXAMPLE.COM)s/.*/hbase/ DEFAULT&lt;/CODE&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;The mapping from Kerberos principal names to local OS user names. &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_security/content/create_mappings_betw_principals_and_unix_usernames.html"&gt;See Creating Mappings Between Principals and UNIX Usernames&lt;/A&gt; for more information.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Fri, 07 Dec 2018 05:47:29 GMT</pubDate>
    <dc:creator>rohnu</dc:creator>
    <dc:date>2018-12-07T05:47:29Z</dc:date>
    <item>
      <title>After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227923#M189783</link>
      <description>&lt;P&gt;I have a kerberized cluster where in local realm trusts AD realm with MIT KDC setup.&lt;/P&gt;&lt;P&gt;AD Realm : EXAMPLE.COM&lt;/P&gt;&lt;P&gt;Local Realm: LOCALREALM.EXAMPLE.COM&lt;/P&gt;&lt;P&gt;Post doing kinit as user@EXAMPLE.COM , I'm able to perform all the regular tasks through command line like creating hbase tables, running mapreduce job etc.&lt;/P&gt;&lt;P&gt;But, when i'm trying to connect to hbase to perform a benchmarking through ycsb tool, it throws an exception as unable to login.&lt;/P&gt;&lt;P&gt;If i authenticate using the local realm such as user@LOCALREALM.EXAMPLE.COM, it works like a charm.&lt;/P&gt;&lt;P&gt;I have the rules added in auth to local to trust AD realm too : RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//&lt;/P&gt;&lt;P&gt;Do not understand if i'm missing anything else. can someone please help ?&lt;/P&gt;&lt;P&gt;Below is a part of the stack trace:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Caused by: java.io.IOException: failure to login&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:782)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:734)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:607)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.User$SecureHadoopUser.&amp;lt;init&amp;gt;(User.java:285)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.User$SecureHadoopUser.&amp;lt;init&amp;gt;(User.java:281)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.User.getCurrent(User.java:185)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.UserProvider.getCurrent(UserProvider.java:88)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:215)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:119)&lt;/P&gt;&lt;P&gt;at com.yahoo.ycsb.db.HBaseClient10.init(HBaseClient10.java:149)&lt;/P&gt;&lt;P&gt;... 3 more&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Caused by: javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: Illegal principal name user@EXAMPLE.COM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.User.&amp;lt;init&amp;gt;(User.java:50)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.User.&amp;lt;init&amp;gt;(User.java:43)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation$HadoopLoginModule.commit(UserGroupInformation.java:179)&lt;/P&gt;&lt;P&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/P&gt;&lt;P&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;/P&gt;&lt;P&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/P&gt;&lt;P&gt;at java.lang.reflect.Method.invoke(Method.java:498)&lt;/P&gt;&lt;P&gt;at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)&lt;/P&gt;&lt;P&gt;at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)&lt;/P&gt;&lt;P&gt;at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)&lt;/P&gt;&lt;P&gt;at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)&lt;/P&gt;&lt;P&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)&lt;/P&gt;&lt;P&gt;at javax.security.auth.login.LoginContext.login(LoginContext.java:588)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:757)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:734)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:607)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.User$SecureHadoopUser.&amp;lt;init&amp;gt;(User.java:285)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.User$SecureHadoopUser.&amp;lt;init&amp;gt;(User.java:281)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.User.getCurrent(User.java:185)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.security.UserProvider.getCurrent(UserProvider.java:88)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:215)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:119)&lt;/P&gt;&lt;P&gt;at com.yahoo.ycsb.db.HBaseClient10.init(HBaseClient10.java:149)&lt;/P&gt;&lt;P&gt;at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:86)&lt;/P&gt;&lt;P&gt;at com.yahoo.ycsb.ClientThread.run(Client.java:424)&lt;/P&gt;&lt;P&gt;at java.lang.Thread.run(Thread.java:748)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Caused by: org.apache.hadoop.security.authentication.util.KerberosName$NoMatchingRule: No rules applied to user@EXAMPLE.COM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.authentication.util.KerberosName.getShortName(KerberosName.java:389)&lt;/P&gt;&lt;P&gt;at org.apache.hadoop.security.User.&amp;lt;init&amp;gt;(User.java:48)&lt;/P&gt;&lt;P&gt;... 26 more&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:53:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227923#M189783</guid>
      <dc:creator>narendra_klu9</dc:creator>
      <dc:date>2022-09-16T13:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227924#M189784</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/23253/narendraklu9.html" nodeid="23253"&gt;@Narendra Neerukonda&lt;/A&gt;&lt;P&gt;I am not familiar with the ycsb tool.  This error coming from that tool.  Does the ycsb tool have the relevant auth-to-local rules configured?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Nov 2018 00:36:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227924#M189784</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-11-10T00:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227925#M189785</link>
      <description>&lt;P&gt;ycsb is a standalone tool. We need to pass the hbase-site.xml and we can run the tests (benchmarking tool for databases)&lt;/P&gt;&lt;P&gt;I'm trying to figure out if any specific auth-to-local rules are required to be configured in ambari. Since i'm triggering it with my user id after authenticating with AD realm (AD realm added to auth-to-local rules), not able to understand why i still have the error. &lt;/P&gt;&lt;P&gt;As far as i'm understanding, the error is not originating from the tool as i'm able to use/run ycsb benchmarking if i authenticate using the local realm (i added my user principal to the local MIT kdc and authenticated using that----getting a ticket as user@LOCALREALM.EXAMPLE.COM instead of user@EXAMPLE.COM).&lt;/P&gt;&lt;P&gt;when using kinit as user@EXAMPLE.COM and running, i'm getting below responses as in the above stack trace:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Caused by: java.io.IOException: failure to login&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Caused by: javax.security.auth.login.LoginException: java.lang.IllegalArgumentException: Illegal principal name &lt;A href="mailto:user@EXAMPLE.COM"&gt;user@EXAMPLE.COM&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Caused by: org.apache.hadoop.security.authentication.util.KerberosName$NoMatchingRule: No rules applied to &lt;A href="mailto:user@EXAMPLE.COM"&gt;user@EXAMPLE.COM&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 04:34:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227925#M189785</guid>
      <dc:creator>narendra_klu9</dc:creator>
      <dc:date>2018-11-11T04:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227926#M189786</link>
      <description>&lt;P&gt;It seems like hbase-site.xml does not contain auth-to-local rules and that Hbase may take those rules from the core-site.xml file.  That said, Ambari will add the needed rules to the core-site.xml file - hadoop.security.auth_to_local - if it known about the additional realm(s). This is done by added EXAMPLE.COM to the Additional Realms field in the Kerberos administration view - as discussed in &lt;A href="https://community.hortonworks.com/questions/227267/unable-to-authenticate-as-username-to-cluster-afte.html" target="_blank"&gt;https://community.hortonworks.com/questions/227267/unable-to-authenticate-as-username-to-cluster-afte.html&lt;/A&gt;.  &lt;/P&gt;&lt;P&gt;Playing with this more, I am able to generate the error you are getting if the auth-to-local rules are not set up properly in core-site.xml. You can test your's my running the following command (not via ycsb):&lt;/P&gt;&lt;PRE&gt;hadoop kerbname &amp;lt;principal name&amp;gt; &lt;/PRE&gt;&lt;P&gt;Or by running &lt;/P&gt;&lt;PRE&gt;hadoop org.apache.hadoop.security.HadoopKerberosName &amp;lt;principal name&amp;gt; 	&lt;/PRE&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;[root@c7401 ~]# hadoop org.apache.hadoop.security.HadoopKerberosName user@UNKNOWN.DOM
18/11/11 14:36:19 INFO util.KerberosName: No auth_to_local rules applied to user@UNKNOWN.DOM
Name: user@UNKNOWN.DOM to user@UNKNOWN.DOM&lt;/PRE&gt;&lt;P&gt;Since I do not have the full stack track or all of the information, I cannot comment on whether the ycsb tool or Hbase is generating that error.  If it is Hbase, itself, then the &lt;I&gt;hadoop kerbname&lt;/I&gt; command (on the relevant host) should show the same error when passing "user@EXAMPLE.COM" to it - assuming Hbase really does use core-site.xml to load the auth-to-local rules. However, if that command does not show the "no auth_to_local_ rules" message, then I would have to assume the error is coming from the ycsb tool and the appropriate core-site.xml file is needed.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 22:48:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227926#M189786</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-11-11T22:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227927#M189787</link>
      <description>&lt;P&gt;Got it. &lt;/P&gt;&lt;P&gt;It started working fine once i passed the core-site.xml properly to the tool. Seems it wasn't able to pick up the rules as it didn't read the core-site.xml file or something. &lt;/P&gt;&lt;P&gt;Thank you &lt;A rel="user" href="https://community.cloudera.com/users/322/rlevas.html" nodeid="322"&gt;@Robert Levas&lt;/A&gt; for helping out.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 15:04:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227927#M189787</guid>
      <dc:creator>narendra_klu9</dc:creator>
      <dc:date>2018-11-12T15:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227928#M189788</link>
      <description>&lt;P&gt;Awesome!  I am glad that I could help out. &lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 20:58:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227928#M189788</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-11-12T20:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227929#M189789</link>
      <description>&lt;P&gt;Because of below parameter in core-site.xml which works for you&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;hadoop.security.auth_to_local&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;The mapping from Kerberos principal names to local OS user names. &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_security/content/create_mappings_betw_principals_and_unix_usernames.html"&gt;See Creating Mappings Between Principals and UNIX Usernames&lt;/A&gt; for more information.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 04:43:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227929#M189789</guid>
      <dc:creator>rohnu</dc:creator>
      <dc:date>2018-12-07T04:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: After enabling kerberos, using hbase through java (using ycsb here for bencharking), unable to login to hbase and getting response as "Illegal principal name" and "No rules applied to"</title>
      <link>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227930#M189790</link>
      <description>&lt;P&gt;Because of this below property in core-site.xml, it works for you&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;hadoop.security.auth_to_local&lt;/TD&gt;&lt;TD&gt;The mapping rules. For example:&lt;P&gt;&lt;CODE&gt;RULE:[2:$1@$0]([jt]t@.*EXAMPLE.COM)s/.*/mapred/ RULE:[2:$1@$0]([nd]n@.*EXAMPLE.COM)s/.*/hdfs/ RULE:[2:$1@$0](hm@.*EXAMPLE.COM)s/.*/hbase/ RULE:[2:$1@$0](rs@.*EXAMPLE.COM)s/.*/hbase/ DEFAULT&lt;/CODE&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;The mapping from Kerberos principal names to local OS user names. &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_security/content/create_mappings_betw_principals_and_unix_usernames.html"&gt;See Creating Mappings Between Principals and UNIX Usernames&lt;/A&gt; for more information.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 05:47:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/After-enabling-kerberos-using-hbase-through-java-using-ycsb/m-p/227930#M189790</guid>
      <dc:creator>rohnu</dc:creator>
      <dc:date>2018-12-07T05:47:29Z</dc:date>
    </item>
  </channel>
</rss>

