apache/hadoop · error · IOException
Aliasmap archive ({tarname}) does not exist
Error message
Aliasmap archive ({tarname}) does not exist What it means
InMemoryAliasMap.completeBootstrapTransfer throws IOException when the expected archive file aliasmap.tar.gz is not present under the given aliasMap directory. The bootstrap protocol transfers the compressed aliasmap from the primary to this host and then calls completeBootstrapTransfer to untar it; a missing tarball means the transfer step never completed (or wrote elsewhere), so extraction cannot start.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/aliasmap/InMemoryAliasMap.java:381
}
}
}
}
}
/**
* Extract the aliasmap archive to complete the bootstrap process. This method
* has to be called after the aliasmap archive is transfered from the primary
* Namenode.
*
* @param aliasMap location of the aliasmap.
* @throws IOException
*/
public static void completeBootstrapTransfer(File aliasMap)
throws IOException {
File tarname = new File(aliasMap, TAR_NAME);
if (!tarname.exists()) {
throw new IOException(
"Aliasmap archive (" + tarname + ") does not exist");
}
try {
FileUtil.unTar(tarname, aliasMap);
} finally {
// delete the archive.
if(!FileUtil.fullyDelete(tarname)) {
LOG.warn("Failed to fully delete aliasmap archive: " + tarname);
}
}
}
/**
* CheckedFunction is akin to {@link java.util.function.Function} but
* specifies an IOException.
* @param <T1> First argument type.
* @param <T2> Second argument type.
* @param <R> Return type.View on GitHub (pinned to 2add963021)
Solutions
- Re-run the bootstrap transfer end-to-end (transfer then complete) against the same target directory, checking the primary NN logs for transfer errors.
- Verify the exact path: the archive must be <aliasMap>/aliasmap.tar.gz where aliasMap is the same value passed to both phases (watch the bpid component).
- Check disk space/permissions on the target and network/HTTP connectivity for the transfer step.
- If a previous partial run is suspected, clear the target dir (remove stale aliasmap_snapshot etc.) before re-running.
Example fix
// before
InMemoryAliasMap.completeBootstrapTransfer(aliasMapDir);
// IOException: Aliasmap archive (/data/aliasmap/BP-1234/aliasmap.tar.gz) does not exist
// after: ensure the transfer phase ran to completion first
if (!transferSucceeded) {
bootstrapTransfer(aliasMapDir, blockPoolID); // writes aliasmap.tar.gz
}
InMemoryAliasMap.completeBootstrapTransfer(aliasMapDir); // untar + delete archive Defensive patterns
Strategy: validation
Validate before calling
File archive = new File(aliasMapDir, "aliasmap.tar.gz");
if (!archive.exists()) {
// run (or re-run) the transfer phase first
transferAliasMapArchive(aliasMapDir, blockPoolID);
}
InMemoryAliasMap.completeBootstrapTransfer(aliasMapDir); Try / catch
try {
InMemoryAliasMap.completeBootstrapTransfer(aliasMap);
} catch (IOException e) {
if (e.getMessage() != null && e.getMessage().contains("Aliasmap archive")
&& e.getMessage().contains("does not exist")) {
// transfer never completed: re-run transfer into the SAME directory, then retry
bootstrapTransfer(alias, bpid);
InMemoryAliasMap.completeBootstrapTransfer(alias);
} else { throw e; }
} Prevention
- Always run transfer and complete phases against the same directory value.
- Check for aliasmap.tar.gz existence (and non-zero size) as a post-transfer assertion.
- Clear stale snapshot/temp artifacts between bootstrap attempts.
When it happens
Trigger: completeBootstrapTransfer(aliasMap) checks new File(aliasMap, "aliasmap.tar.gz").exists() and finds nothing — the preceding bootstrapTransfer/transfer phase failed silently, was interrupted, copied to the wrong directory, or the archive was already consumed and deleted by a prior run.
Common situations: Calling complete before/without a successful transfer; mismatch between the directory passed to transfer and to complete (e.g., bpid subdir vs parent); retrying after an earlier run that untars-then-deletes the archive; disk full or permissions causing the transfer to abort before writing the tarball.
Related errors
- InMemoryAliasMap location is null
- Unable to create missing aliasmap location: {levelDBpath}
- Failed to fully delete compressed aliasmap {compressedAliasM
- Unable to create aliasmap snapshot directory {newLevelDBDir}
- InMemoryAliasMap enabled with null location
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/9172c636dbe6ce6d.
Report an issue: GitHub.