Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-4883

audit to HDFS fails with error: org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "hdfs"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • 3.0.0, 2.5.0
    • None
    • audit, plugins
    • None

    Description

      Writing audit log to HDFS fails with the following error in Kafka and Knox plugins:

      Kafka plugin:

      [2024-08-01 01:48:50,242] ERROR Exception encountered while writing audits to HDFS! (org.apache.ranger.audit.utils.RangerJSONAuditWriter)
      org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "hdfs"
              at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3443)
              at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3466)
              at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:174)
              at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3574)
              at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3521)
              at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:540)
              at org.apache.ranger.audit.utils.AbstractRangerAuditWriter.createFileSystemFolders(AbstractRangerAuditWriter.java:97)
      

       

      Knox plugin:

      01:52:21.193 [org.apache.ranger.audit.queue.AuditBatchQueue1] ERROR org.apache.ranger.audit.utils.RangerJSONAuditWriter - Exception encountered while writing audits to HDFS!
      org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "hdfs"
              at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3443)
              at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3466)
              at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:174)
              at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3574)
              at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3521)
              at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:540)
              at org.apache.ranger.audit.utils.AbstractRangerAuditWriter.createFileSystemFolders(AbstractRangerAuditWriter.java:97)
      

       

      This is due to the plugins packaging missing library hadoop-hdfs-client, which includes the necessary entry to handle "hdfs" file scheme in META-INF/services/
      org.apache.hadoop.hdfs.fs.FileSystem.

      Attachments

        Activity

          People

            madhan Madhan Neethiraj
            madhan Madhan Neethiraj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: