apache/hadoop · error · IOException

User just deleted?:" + user

Error message

User just deleted?:" + user

What it means

ShellBasedIdMapping.getUid looks the user up in the cached bidirectional uidNameMap; on a miss it calls updateMapIncr, which shells out for that single user, then retries the map. If the user is still absent, it throws IOException('User just deleted?:<user>'), meaning the OS name service (plus any static mapping) has no uid for the name.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ShellBasedIdMapping.java:640

          gidMapping.put(localId, remoteId);
        }
      }
    } finally {
      in.close();
    }
    
    return new StaticMapping(uidMapping, gidMapping);
  }

  synchronized public int getUid(String user) throws IOException {
    checkAndUpdateMaps();

    Integer id = uidNameMap.inverse().get(user);
    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();
  }

View on GitHub (pinned to 2add963021)

Solutions

  1. Verify the user resolves on the node: 'id -u <user>' and 'getent passwd <user>'
  2. If the user legitimately does not exist locally, add a static mapping entry in the static ID mapping file (default /etc/nfs.static.map)
  3. Fix LDAP/NSS connectivity if the user exists upstream but not locally
  4. Retry after the mapping cache timeout if the user was created moments ago

Example fix

# /etc/nfs.static.map (uid 1001 remote -> local uid 1001 mapping style)
# before: file absent, user 'nfsuser' unknown to the host
# after:
nfsuser 1001
Defensive patterns

Strategy: validation

Validate before calling

static boolean userResolvable(String user) throws IOException {
  Process p = new ProcessBuilder("id", "-u", user).start();
  try { return p.waitFor() == 0; }
  finally { p.destroy(); }
}
// call before idMapping.getUid(user) for foreign usernames

Prevention

When it happens

Trigger: Requesting getUid for a user that does not exist on the host (typical for NFS gateway requests carrying remote usernames), a user deleted between the full map refresh and the lookup, or a user covered by neither passwd nor the static ID mapping file.

Common situations: NFS gateway clients accessing HDFS as users absent from the gateway host; intermittent LDAP/NSS failures making a real user unresolvable; users removed while sessions are active.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/7c62a6af7c8c1ec7. Report an issue: GitHub.