{"record":{"id":"3bd05c6f835955de","repo":"apache/hadoop","slug":"path-is-not-a-symbolic-link","errorCode":null,"errorMessage":"Path {} is not a symbolic link","messagePattern":"Path (.+?) is not a symbolic link","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java","lineNumber":1610,"sourceCode":"  }\n\n  @Override // ClientProtocol\n  public String getLinkTarget(String path) throws IOException {\n    checkNNStartup();\n    metrics.incrGetLinkTargetOps();\n    HdfsFileStatus stat = null;\n    try {\n      stat = namesystem.getFileInfo(path, false, false, false);\n    } catch (UnresolvedPathException e) {\n      return e.getResolvedPath().toString();\n    } catch (UnresolvedLinkException e) {\n      // The NameNode should only throw an UnresolvedPathException\n      throw new AssertionError(\"UnresolvedLinkException thrown\");\n    }\n    if (stat == null) {\n      throw new FileNotFoundException(\"File does not exist: \" + path);\n    } else if (!stat.isSymlink()) {\n      throw new IOException(\"Path \" + path + \" is not a symbolic link\");\n    }\n    return DFSUtilClient.bytes2String(stat.getSymlinkInBytes());\n  }\n\n\n  @Override // DatanodeProtocol\n  public DatanodeRegistration registerDatanode(DatanodeRegistration nodeReg)\n      throws IOException {\n    checkNNStartup();\n    verifySoftwareVersion(nodeReg);\n    namesystem.registerDatanode(nodeReg);\n    return nodeReg;\n  }\n\n  @Override // DatanodeProtocol\n  public HeartbeatResponse sendHeartbeat(DatanodeRegistration nodeReg,\n      StorageReport[] report, long dnCacheCapacity, long dnCacheUsed,\n      int xmitsInProgress, int xceiverCount,","sourceCodeStart":1592,"sourceCodeEnd":1628,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java#L1592-L1628","documentation":"Error \"Path {} is not a symbolic link\" thrown in apache/hadoop.","triggerScenarios":"A symlink-specific operation is invoked on a regular file or directory.","commonSituations":"Calling getLinkTarget or symlink metadata operations on a non-symlink path.","solutions":["Provide a path that is actually a symbolic link; the target is not a symlink."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}