apache/hadoop · error · IOException
Symlink path exceeds {} character limit
Error message
Symlink path exceeds {} character limit What it means
Error "Symlink path exceeds {} character limit" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:1575
checkNNStartup();
namesystem.setTimes(src, mtime, atime);
}
@Override // ClientProtocol
public void createSymlink(String target, String link, FsPermission dirPerms,
boolean createParent) throws IOException {
checkNNStartup();
namesystem.checkOperation(OperationCategory.WRITE);
CacheEntry cacheEntry = getCacheEntry();
if (cacheEntry != null && cacheEntry.isSuccess()) {
return; // Return previous response
}
/* We enforce the MAX_PATH_LENGTH limit even though a symlink target
* URI may refer to a non-HDFS file system.
*/
if (!checkPathLength(link)) {
throw new IOException("Symlink path exceeds " + MAX_PATH_LENGTH +
" character limit");
}
final UserGroupInformation ugi = getRemoteUser();
boolean success = false;
try {
PermissionStatus perm = new PermissionStatus(ugi.getShortUserName(),
null, dirPerms);
namesystem.createSymlink(target, link, perm, createParent,
cacheEntry != null);
success = true;
} finally {
RetryCache.setState(cacheEntry, success);
}
}
View on GitHub (pinned to 2add963021)
Solutions
- Shorten the symlink target or raise dfs.namenode.fs-limits.max-symlink-length if longer links are required.
When it happens
Trigger: createSymlink is called with a target path longer than the configured symlink length limit.
Common situations: Creating symlinks to very long target paths via the HDFS API or WebHDFS.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/6da516af772ff83d.
Report an issue: GitHub.