{"record":{"id":"6683f32c49740633","repo":"apache/hadoop","slug":"viewfs-cannot-initialize-invalid-entry-in-mount","errorCode":null,"errorMessage":"ViewFs: Cannot initialize: Invalid entry in Mount table in config: {src}","messagePattern":"ViewFs: Cannot initialize: Invalid entry in Mount table in config: (.+?)","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java","lineNumber":690,"sourceCode":"        src = src.substring(Constants.CONFIG_VIEWFS_LINK_NFLY.length() + 1);\n        // settings.src\n        settings = src.substring(0, src.indexOf('.'));\n        // settings\n\n        // settings.src\n        src = src.substring(settings.length() + 1);\n        // src\n\n        linkType = LinkType.NFLY;\n      } else if (src.startsWith(Constants.CONFIG_VIEWFS_LINK_REGEX)) {\n        linkEntries.add(\n            buildLinkRegexEntry(config, ugi, src, si.getValue()));\n        continue;\n      } else if (src.startsWith(Constants.CONFIG_VIEWFS_HOMEDIR)) {\n        // ignore - we set home dir from config\n        continue;\n      } else {\n        throw new IOException(\"ViewFs: Cannot initialize: Invalid entry in \" +\n            \"Mount table in config: \" + src);\n      }\n\n      final String target = si.getValue();\n      if (linkType != LinkType.MERGE_SLASH) {\n        if (isMergeSlashConfigured) {\n          throw new IOException(\"Mount table \" + mountTableName\n              + \" has already been configured with a merge slash link. \"\n              + \"A regular link should not be added.\");\n        }\n        linkEntries.add(\n            new LinkEntry(src, target, linkType, settings, ugi, config));\n      } else {\n        if (!linkEntries.isEmpty()) {\n          throw new IOException(\"Mount table \" + mountTableName\n              + \" has already been configured with regular links. \"\n              + \"A merge slash link should not be configured.\");\n        }","sourceCodeStart":672,"sourceCodeEnd":708,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/InodeTree.java#L672-L708","documentation":"While parsing fs.viewfs.mounttable.<name>.* keys, InodeTree maps each key suffix to a known kind: link., linkNfly., link fallback, linkMerge., linkMergeSlash., linkRegex, homedir. A suffix matching none of them reaches the final else and throws IOException('ViewFs: Cannot initialize: Invalid entry in Mount table in config: <src>') with the raw suffix for easy identification.","triggerScenarios":"Typos in key prefixes: fs.viewfs.mounttable.X.lnk./data, ...X.links./data, unknown kinds like ...X.mount./data, or stray properties placed under the mounttable prefix.","commonSituations":"Hand-edited core-site.xml; config generation that drops or doubles the dot; unrelated properties inherited under fs.viewfs.mounttable.<name>.","solutions":["Correct the prefix to a supported kind (link., linkMerge., linkMergeSlash., linkNfly., linkRegex, fallback, homedir)","Remove unrelated properties from under fs.viewfs.mounttable.<name>.","When the error names a suffix, grep every config source for that suffix to find the offending key"],"exampleFix":"<!-- before -->\n<property><name>fs.viewfs.mounttable.cluster.lnk./data</name>\n  <value>hdfs://nnA/data</value></property>\n\n<!-- after -->\n<property><name>fs.viewfs.mounttable.cluster.link./data</name>\n  <value>hdfs://nnA/data</value></property>","handlingStrategy":"validation","validationCode":"static final List<String> VALID_PREFIXES = Arrays.asList(\n    \"link.\", \"linkMerge.\", \"linkMergeSlash\", \"linkNfly.\", \"linkRegex\", \"homedir\");\nstatic boolean isValidMountKeySuffix(String suffix) {\n  return VALID_PREFIXES.stream().anyMatch(suffix::startsWith);\n}","typeGuard":null,"tryCatchPattern":"Catch IOException at ViewFileSystem init; the message includes the invalid suffix — grep all configuration sources for that suffix and correct or remove the key.","preventionTips":["Spell link. and linkMerge. prefixes exactly","Do not place unrelated properties under fs.viewfs.mounttable","Grep configs for typos like lnk. and links. before deploy"],"tags":["hadoop","viewfs","mount-table","configuration","typo"],"backgroundTag":"invalid-configuration-key","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}