apache-sparkhadoopbigdatahadoop-yarnkerberos

Is it possible to disable Hadoop yarn PTR check when kerberos is enabled?


We have a hadoop cluster which currenty is running on Public IP. We want to change the cluster ip to Private IP addresses. So it doesnt be routable from internet. But the main problem is that When the spark clients try to connect to resource manager and submit an application. It will check the PTR record of resource manager in the spark client, and if there was a mismatch it will say that IllegalArgumentException: Server has invalid Kerberos principal. To solve this problem, we have to add server address to /etc/hosts, and it works. But there is a problem, We have to edit this file in many VMs that connect to resource manager. Is there any way to disable this reverse IP check?

We tried changing krb5.conf and set configs such as rdns = false but it didn't work.


Solution

  • Finally, I found the solution to this question by reading Hadoop codes.

    you can add the following config to your spark client yarn-site.conf based on your specific config.

       <property>
        <name>yarn.resourcemanager.principal.pattern</name>
        <value>*</value>
       </property>
    

    and the following in hdfs-site.xml

    <property>
        <name>dfs.namenode.kerberos.principal.pattern</name>
        <value>*</value>
    </property>