Support Questions

Find answers, ask questions, and share your expertise

Error: no rules applied for specific user

avatar
Explorer

Hello,

 

II'm having this error while accessing and writing in HDFS via Java program:

 

org.apache.hadoop.security.authentication.util.KerberosName$NoMatchingRule: No rules applied rlopez@PRE.FINTONIC.COM

 

However, I enabled my Tusted Realm to HDFS and auth_to_local option. This is what I configure:

 

<property>
<name>hadoop.security.auth_to_local</name>
<value>RULE:[1:$1@$0](.*@\QPRE.FINTONIC.COM\E$)s/@\QPRE.FINTONIC.COM\E$//
RULE:[2:$1@$0](.*@\QPRE.FINTONIC.COM\E$)s/@\QPRE.FINTONIC.COM\E$//
DEFAULT</value>
</property>

 

This is the configuration of my code to read my principal and keytab:

 

HDFSWriter.kerberosPrincipal=hdfs/clouderapre-mgr.fintonic.com@PRE.FINTONIC.COM
HDFSWriter.kerberosUser=rlopez@PRE.FINTONIC.COM
HDFSWriter.kerberosKeyTab=/home/raquel/rlopez.keytab

 

How can I solve this problem?

1 REPLY 1

avatar
Expert Contributor

Hi rlopez,

You might try this command to test your configuration:

 

$ hadoop jar <hadoop-common jar> org.apache.hadoop.security.HadoopKerberosName rlopez@PRE.FINTONIC.COM

 

Replace <hadoop-common jar> with your hadoop-common library installation path, for example, /opt/cloudera/parcels/CDH/lib/hadoop/hadoop-common-2.6.0-cdh5.15.1.jar 

 

You would then get the following output:

18/07/06 14:02:05 INFO util.KerberosName: No auth_to_local rules applied to rlopez@PRE.FINTONIC.COM
Name: rlopez@PRE.FINTONIC.COM to rlopez@PRE.FINTONIC.COM