hadoopapache-ranger

Hadoop-Apache Ranger: StackOverflowError on namenode restart


I am getting this error after enabling hdfs plugin in apache ranger. When I run enable-hdfs-plugin.sh ranger adds following configuration in hdfs-site.xml.

<property>
      <name>dfs.permissions.enabled</name>
      <value>true</value>
  </property>
  <property>
      <name>dfs.permissions</name>
      <value>true</value>
  </property>
  <property>
      <name>dfs.namenode.inode.attributes.provider.class</name>
      <value>org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer</value>
  </property>

But if I remove the above property and restart my namenode, it starts with no error. Also, when I try to format the namenode it gives me the same error.

This is my install.properties of ranger's hdfs-plugin.


Solution

    1. Link ranger-1.0.0-SNAPSHOT-hdfs-plugin/lib/ranger-hdfs-plugin-impl to /var/local/hadoop/hadoop-2.7.3/share/hadoop/hdfs/lib/ranger-hdfs-plugin-impl

    2. Link ranger-1.0.0-SNAPSHOT-hdfs-plugin/lib/ranger-hdfs-plugin-shim-1.0.0-SNAPSHOT.jar to /var/local/hadoop/hadoop-2.7.3/share/hadoop/hdfs/lib/ranger-hdfs-plugin-shim-1.0.0-SNAPSHOT.jar

    3. Link ranger-1.0.0-SNAPSHOT-hdfs-plugin/lib/ranger-plugin-classloader-1.0.0-SNAPSHOT.jar to /var/local/hadoop/hadoop-2.7.3/share/hadoop/hdfs/lib/ranger-plugin-classloader-1.0.0-SNAPSHOT.jar

    follow these instruction as per your file path. The problem is due to classloader is not found in your hadoop file path.