{"record":{"id":"b81be27b8a445005","repo":"apache/hadoop","slug":"h08","errorCode":"H08","errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"error_code","errorClass":"FileSystemAccessException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/hadoop/FileSystemAccessService.java","lineNumber":398,"sourceCode":"    }\n    try {\n      validateNamenode(\n          new URI(conf.getTrimmed(\n              CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY)).\n                  getAuthority());\n      UserGroupInformation ugi = getUGI(user);\n      return ugi.doAs(new PrivilegedExceptionAction<FileSystem>() {\n        @Override\n        public FileSystem run() throws Exception {\n          return createFileSystem(conf);\n        }\n      });\n    } catch (IOException ex) {\n      throw ex;\n    } catch (FileSystemAccessException ex) {\n      throw ex;\n    } catch (Exception ex) {\n      throw new FileSystemAccessException(FileSystemAccessException.ERROR.H08, ex.getMessage(), ex);\n    }\n  }\n\n  @Override\n  public FileSystem createFileSystem(String user, final Configuration conf) throws IOException,\n    FileSystemAccessException {\n    unmanagedFileSystems.incrementAndGet();\n    return createFileSystemInternal(user, conf);\n  }\n\n  @Override\n  public void releaseFileSystem(FileSystem fs) throws IOException {\n    unmanagedFileSystems.decrementAndGet();\n    closeFileSystem(fs);\n  }\n\n  @Override\n  public Configuration getFileSystemConfiguration() {","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/hadoop/FileSystemAccessService.java#L380-L416","documentation":"FileSystemAccessService.createFileSystemInternal() creates a FileSystem as the end user via ugi.doAs(createFileSystem(conf)). IOExceptions and FileSystemAccessExceptions are rethrown unchanged; any other exception (RuntimeException/IllegalArgumentException from the Hadoop client, e.g. 'No FileSystem for scheme' or bad fs.defaultFS) is wrapped as error H08, whose message template '{0}' is just the original exception's message.","triggerScenarios":"Calling FileSystemAccess.createFileSystem/createFileSystemInternal when createFileSystem(conf) throws a non-IOException: IllegalArgumentException for an unknown or unconfigured filesystem scheme, RuntimeException from DFSClient/static config misuse, or a ClassCastException from a misconfigured fs implementation class.","commonSituations":"fs.defaultFS scheme has no FileSystem implementation on the httpfs classpath (missing jar); core-site.xml io.file.buffer/fs impl misconfiguration; a custom filesystem implementation class not on the webapp classpath; version mismatch producing runtime errors during client init.","solutions":["Read the message - it is the original exception's message and names the real problem (scheme, class, property)","Verify fs.defaultFS in the hadoop conf dir used by httpfs and that the scheme's implementation jar is on the httpfs classpath","For custom filesystems, add the implementation jar to the httpfs webapp and ensure the fs.<scheme>.impl property is set","Retry after fixing configuration; restart httpfs if classpath jars were changed"],"exampleFix":"# before: no implementation for scheme -> H08 'No FileSystem for scheme: myfs'\n#   fs.defaultFS = myfs://nn1:8020\n\n# after: ship the implementation jar to httpfs and register it in core-site.xml\n<property><name>fs.myfs.impl</name><value>com.myco.MyFileSystem</value></property>","handlingStrategy":"validation","validationCode":"import org.apache.hadoop.fs.FileSystem;\n\n// Fail fast on a scheme httpfs cannot instantiate\njava.net.URI u = java.net.URI.create(conf.get(\"fs.defaultFS\"));\nif (u.getScheme() != null) {\n  java.util.Set<String> schemes = new java.util.HashSet<>(\n      java.util.Arrays.asList(FileSystem.getDefaultUri(conf).getScheme()));\n  Class<? extends FileSystem> impl = conf.getClass(\"fs.\" + u.getScheme() + \".impl\", null, FileSystem.class);\n  if (impl == null && !\"hdfs\".equals(u.getScheme()) && !\"file\".equals(u.getScheme())) {\n    throw new IllegalStateException(\"no fs implementation for scheme \" + u.getScheme());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  FileSystem fs = fsAccess.createFileSystem(user, conf);\n} catch (FileSystemAccessException ex) {\n  if (ex.getError() == FileSystemAccessException.ERROR.H08) {\n    Throwable cause = ex.getCause(); // original RuntimeException, message preserved\n    log.error(\"filesystem creation failed: {}\", cause, ex);\n  }\n  throw ex;\n}","preventionTips":["Put the filesystem implementation jar for any custom scheme on the httpfs classpath, not just the client's","Smoke-test createFileSystem once after deploy/configuration changes","Keep fs.defaultFS and fs.<scheme>.impl consistent in the conf dir httpfs uses"],"tags":["httpfs","hdfs","filesystem","runtime","classpath"],"backgroundTag":"filesystem-create-failed","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}