apache/hadoop · error · IOException
No such group:" + group
Error message
No such group:" + group
What it means
ShellBasedIdMapping.getGid mirrors getUid for groups: it checks the cached gidNameMap, on a miss runs updateMapIncr for that group, and throws IOException('No such group:<group>') when the group still cannot be found in the OS name service or static mapping.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ShellBasedIdMapping.java:654
if (id == null) {
updateMapIncr(user, false);
id = uidNameMap.inverse().get(user);
if (id == null) {
throw new IOException("User just deleted?:" + user);
}
}
return id.intValue();
}
synchronized public int getGid(String group) throws IOException {
checkAndUpdateMaps();
Integer id = gidNameMap.inverse().get(group);
if (id == null) {
updateMapIncr(group, true);
id = gidNameMap.inverse().get(group);
if (id == null) {
throw new IOException("No such group:" + group);
}
}
return id.intValue();
}
synchronized public String getUserName(int uid, String unknown) {
checkAndUpdateMaps();
String uname = uidNameMap.get(uid);
if (uname == null) {
try {
updateMapIncr(uid, false);
} catch (Exception e) {
}
uname = uidNameMap.get(uid);
if (uname == null) {
LOG.warn("Can't find user name for uid " + uid
+ ". Use default user name " + unknown);
uname = unknown;View on GitHub (pinned to 2add963021)
Solutions
- Verify with 'getent group <group>' and 'id <user>' on the mapping host
- Add the group to the OS, or map it via the static ID mapping file (default /etc/nfs.static.map)
- Repair LDAP/NSS lookups if the group exists upstream
- Ensure gateway hosts can enumerate the same directory used by clients
Example fix
# before: group 'hadoop-eng' not present on gateway host sudo groupadd -g 2500 hadoop-eng # or /etc/nfs.static.map entry hadoop-eng 2500
Defensive patterns
Strategy: validation
Validate before calling
static boolean groupResolvable(String group) throws IOException {
Process p = new ProcessBuilder("getent", "group", group).start();
try { return p.waitFor() == 0; }
finally { p.destroy(); }
}
// call before idMapping.getGid(group) Prevention
- Ensure chown/chgrp targets exist in the OS directory backing the gateway
- Maintain static mapping entries for groups not in the OS
- Re-check group existence after directory migrations
When it happens
Trigger: Calling getGid with a group name that has no entry in /etc/group (or the NSS backend) and no static mapping entry; typical when chown/chgrp operations through the NFS gateway reference groups unknown to the gateway host.
Common situations: Gateway hosts not joined to the same directory as clients; groups renamed or deleted in LDAP while files still reference them; missing static mapping coverage for synthetic groups.
Related errors
- User just deleted?:" + user
- Can't parse " + mapName + " list entry:" + line
- Number of group names and ids do not match. group name =" +
- The user name '" + userName + "' is not found. " + errMessag
- failed to get group id list for user '" + userName + "'
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/157bc49a04842794.
Report an issue: GitHub.